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

Chunk upload not working the whole content is posted after upload

1 Answer 156 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Sudipto
Top achievements
Rank 1
Sudipto asked on 21 Mar 2013, 09:43 AM
Hi,
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.

1 Answer, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 26 Mar 2013, 11:44 AM
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.

Regards,
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.
Tags
AsyncUpload
Asked by
Sudipto
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Share this question
or