Chunk upload not working the whole content is posted after upload

2 posts, 0 answers
  1. Sudipto
    Sudipto avatar
    2 posts
    Member since:
    Mar 2013

    Posted 21 Mar 2013 Link to this post

    The chunk upload is not working I am getting whole file as post, I want the uploader to post file to the handler in chunk of 128kb.There is no example for Chunk upload. I also don't want to upload file to the local folder.I just want the chunk information in the handler.

    If any help can be provided it would be very helpfull.
     <telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" HttpHandlerUrl="~/Handler.ashx"
                   OnClientFileUploaded="fileUploaded" OnClientFileUploadRemoving="fileUploadRemoving"
                   MultipleFileSelection="Automatic" AllowedFileExtensions="jpeg,jpg,gif,png,bmp,zip"  ManualUpload="true"     />

    Handler code
    protected override IAsyncUploadResult Process(UploadedFile file, HttpContext context, IAsyncUploadConfiguration configuration, string tempFileName)
            // Call the base Process method to save the file to the temporary folder
            // base.Process(file, context, configuration, tempFileName);

            // Populate the default (base) result into an object of type SampleAsyncUploadResult
            SampleAsyncUploadResult result = CreateDefaultUploadResult<SampleAsyncUploadResult>(file);
                string filename=file.GetName();

    And also large files approx 100 mb are not uploading. I have put the maxRequestLength="102400" executionTimeout="3600" in web config also

    Please help.
  2. Hristo Valyavicharski
    Hristo Valyavicharski avatar
    975 posts

    Posted 26 Mar 2013 Link to this post

    Hi Sudipto,

    When DisableChunkUpload is set to true file is uploaded at once into the memory and it does not exists on the file system. When DisableChunkUpload is set to false file is uploaded on chunks. All chunks are written in the temp file. Size of chunks is controlled by ChunkSize property. 

    Note that in both cases Handler's Process method is called once after the file is uploaded in the memory or after it is uploaded in the temp folder. 

    For larger files try to add MaxFileSize for the RadAsyncUpload or increase the execution timeout.

    Hristo Valyavicharski
    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.
Back to Top