This project is read-only.

[How to] Upload Script

Topics: Core, Customizing Orchard
May 24, 2013 at 10:30 AM
I'm new in Orchard CMS
I need to build a website which allows user upload Script (.xml or .txt file) from front-end of website (not Dashboard)
I've found in Orchard.Media and Orchard.MediaPicker, but it didn't help me anymore.
Please help me and I always appreciate any helps from you !
May 24, 2013 at 6:01 PM
I guess by "script" you mean script in the common sense like script of a screen play, but not a computer script, right?

It depends on what exactly you want to do: in its most simplistic form this can be done with a simple controller where in the action you handle the upload, much like in a standard MVC action, then save the file through IStorageProvider (see sample) or IMediaService, even. Don't forget to have a permission check in the action (sample here).

Or you could use content items too, if not with MediaPicker then with some third party module.