This is probably not the correct forum to post this in but I couldn't find a WebUpload forum. I just need to know how to access the WebUpload control's equivalent to the asp:FileUpload control's FileBytes object. With the FileUpload control I can access the contents of the file as a byte array by accessing FileUpload.FileBytes. I need to be able to do this because we're not allowed to upload files to our webserver. Therefore, we have to capture the bits and put them into a MemoryStream. Once we've done that we can create an in-memory Zip file and email the file contents. Is there not an equivalent object in the WebUpload control like the FileUpload control's FileBytes object?
Hi,
First you should specify upload path in web.config which is indeed folder for temporary uploaded files. Then you can attach to server side event - UploadFinishing. This event is fired when the whole content of the file is uploaded in the temporary folder(specified in web.config). Then the file is with temporary filename(which is unique for the folder). In the event handler you can move this file to the folder where you want. In the event args you have information about original filename and temporary filename(also filesize and MIME type). In this way you will dynamically specify fileupload path.
Thanks for using our controls,
Miro Hristov
Is it possible to specify the fileuploadpath dynamically from code-behind ?
because I have to upload files directly to the Azure Blob Storage using WebUpload control.
is it possible ?
Thanks for the reply. For future reference which forum should I post WebUpload questions in? Is this the correct one?
Hi DTMartinUPS,
For now we have not implemented such functionallity - WebUpload could save file content directly on files for now. In future we can implement such feature.
Regards,Miro Hristov