Use Custom/Surface Controller to manipulate file upload
Hi All,
Happy New Year!
I am trying to undertake a little project that I am hoping I can get some direction on. I have been working with Umbraco for about 8 months, and I want to start extending and implementing some of my ideas.
What I want is for someone to upload a CSV file (a program/schedule for our company events ), and have the CSV file exported to JSON and deserialized on the view (html) into a table that we designed.
I have created the script to make those conversions, but Is there a way to create a a model/controller for a macro to collect the file upload info (really just need the resulting file location), so I can reference it in my script? Being able to use macros would be ideal. I created a custom model/controller and I get errors when creating the macro, because the macro is automatically trying to call the PartialViewMacroPage despite referencing my model.
Would you all have any alternatives to approaching this type of project? I might just be brain dead for the day, but I need to figure out how to pull that file data from the macro.
Use Custom/Surface Controller to manipulate file upload
Hi All,
Happy New Year!
I am trying to undertake a little project that I am hoping I can get some direction on. I have been working with Umbraco for about 8 months, and I want to start extending and implementing some of my ideas.
What I want is for someone to upload a CSV file (a program/schedule for our company events ), and have the CSV file exported to JSON and deserialized on the view (html) into a table that we designed.
I have created the script to make those conversions, but Is there a way to create a a model/controller for a macro to collect the file upload info (really just need the resulting file location), so I can reference it in my script? Being able to use macros would be ideal. I created a custom model/controller and I get errors when creating the macro, because the macro is automatically trying to call the PartialViewMacroPage despite referencing my model.
Would you all have any alternatives to approaching this type of project? I might just be brain dead for the day, but I need to figure out how to pull that file data from the macro.
Thanks, Colin
Hi Colin,
Happy new year!
You could add a form with a file upload element to your view, and then create a surface controller to upload your CSV file.
is working on a reply...