Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
Single or multiple UploadHandlers, Stream and noStream controls
posted

Hi,
I work on C#, .NET 4.5 with Ignite UI 2012.3.
Here is the problem : I have some pages on which the user uploads large files or packets of files - 10-500 MB and some pages on which the user uploads 'logo.png' or some other small files. Thus I have used your implementation in the documentation as basis (Saving Files as Memory Stream by Processing Each Uploaded Chunk of the File Individually) for the page with the large files so I can directly save them to Azure Blob or Local Disk.

It works fine. But this is done also by adding '<add key="FileSaveType" value="memorystream" />' to web.config which rendered unusable my other basic upload controls on other pages. Those I used without registering a handler. ( Have I configured something wrong? )

There is only one option before me and I ask for confirmation and suggestion for best practice : I must register handlers for every control using stream mode. This is not a problem. But I want to know if I can reuse the handlers because I see that the FileUploadingEventArgs e.TemporaryFileName is randomly generated so uploaded files will not step on each others toes.

What is best in this situation? Can I reuse the upload handler methods and register all controls ( by their controlId ) with the same upload handler or I have to make separate instance of the handler methods for every registration? Is there a way to use streamed and not streamed controls in the same project?

If I can reuse the upload handling methods ( FileUploading, FinishingUpload and FinishedUpload ) it will be best.