Try our conversational search powered by Generative AI!

Uploading file code snippet?



Does anyone have a code snippet showing how to upload a file to a folder (Global Files, Documents or such) in the EPiServer File Manager?

I'm currently using CMS 5 R2.

Oct 20, 2010 9:10

Use ASP FileUpload control and read some tips here:

Oct 20, 2010 9:32

Yes, Fredrik's blogpost sums it up nicely.

Beware however to not use the FileUpload.FileBytes as mentioned in one of the comments as this will bring in the complete file contents into memory, something that can be disastreous - imagine what happens if someone uploads a 3Gb file.

Instead get the FileContent streaam and read/write in reasonably sized chunks.


Oct 20, 2010 9:56
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.