Jump to:

5552 Posts in 1742 Topics by 1226 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Upload and process file in admin interface

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1090 Views
  • craesh
    Avatar
    Community Member
    25 Posts

    Upload and process file in admin interface Link to this post

    Hi!

    I need to upload a file in the admin interface and process it afterwards, without saving it. It's a XML file that contains some fields to create new DataObjects. Ok, so I'll need a FileField in my getCMSFields(), but how do I tell it to call a given method of my Page to process the file there?

    In addition, I'll need a way to display some feedback - whether the file has been imported successfully or there have been some errors.

    Thanks!
    craesh

  • craesh
    Avatar
    Community Member
    25 Posts

    Re: Upload and process file in admin interface Link to this post

    Since there haven't been any comments y will talk about my current approach:

    I've found the "creating a module" tutorial and have started my work based on it. I've added a button "upload new xml file" to the left panel that leads me to a form to upload a new file - ok, it should, I'm currently facing a "javascript parsing error". It seams to be more convenient to have the upload form in a separate module rather than in a Page object and doing the processing in the onBeforeWrite method.

    Greetings
    craesh

    1090 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.