This is a migrated thread and some comments may be shown as answers.

RadAsyncUpload custom upload handler

4 Answers 280 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Marko
Top achievements
Rank 1
Marko asked on 03 May 2012, 03:30 PM
I implemented custom HttpHandler (AsyncUploadHandler) to use with RadAsyncUpload control. This works fine.
I see that when uploading a file, content is split into 2MB chunks and sent to server, or to be more precise to this handler I created. In the custom handler it's only possible to override Process method which is fired when all the chunks are downloaded.

Regarding this scenario I have a few questions:

1. Is there some way to catch event when every chunk is received on the server?
2. I set TemporaryFileExpiration to 5 minutes, but I noticed that sometime files are not deleted from the temp folder. Any idea where to search for the problem? I never manually save the file to any location.
3. How is the upload progress calculated? I noticed the ProgressHandlerUrl, but didn't find any documentation, or example on how to use it. Is it possible to have some custom progress handler?

Thanks!
Marko

4 Answers, 1 is accepted

Sort by
0
Yuriy
Top achievements
Rank 1
answered on 07 May 2012, 01:27 PM
Hello,

I have similar issue and looking for a way to manage content upload. I don't want large files to be copied to the temp folder but pass chunks directly to a custom service.
Marko, have you got any farther on this problem?

Thank you much !
0
Peter Filipov
Telerik team
answered on 08 May 2012, 04:02 PM
Hello,

@Marko - The files are uploading on chunks because the maximum request in ASP.NET is 4MB and if the request exceeds this value an exception is thrown. To avoid that behavior you need to set request length from your web config (which we want to avoid).

1. It is possible only to access the Process method (after the file is assembled). There is no event or method to access the uploading chunks.
2. If you are overriding the Process method, you need to call the base if you want the uploaded files to be deleted automatically after a certain time.
3. We do not support custom progress handler.

@Yuriy  - if you want to limit the uploading file size you can use the MaxFileSize property.

All the best,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Marko
Top achievements
Rank 1
answered on 09 May 2012, 09:42 AM
Hello,

@Peter - Thanks for the clarification! I guess these are non standard requests/user scenarios anyway.

@Yuriy - Looks like it is not possible not to have this temp location for storing uploaded files. The next best thing is to delete the file as soon as you process it.

Marko
0
Yuriy
Top achievements
Rank 1
answered on 11 May 2012, 12:39 PM
Thank you, Gentlemen!
Tags
AsyncUpload
Asked by
Marko
Top achievements
Rank 1
Answers by
Yuriy
Top achievements
Rank 1
Peter Filipov
Telerik team
Marko
Top achievements
Rank 1
Share this question
or