RadAsyncUpload custom upload handler

5 posts, 0 answers
  1. Marko
    Marko avatar
    9 posts
    Member since:
    Mar 2012

    Posted 03 May 2012 Link to this post

    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

  2. Yuriy
    Yuriy avatar
    10 posts
    Member since:
    May 2012

    Posted 07 May 2012 Link to this post

    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 !
  3. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 08 May 2012 Link to this post

    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.
  4. Marko
    Marko avatar
    9 posts
    Member since:
    Mar 2012

    Posted 09 May 2012 Link to this post

    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
  5. Yuriy
    Yuriy avatar
    10 posts
    Member since:
    May 2012

    Posted 11 May 2012 Link to this post

    Thank you, Gentlemen!
Back to Top