We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Chunk Upload doesn't add header and upload failed from the second times.

Hi,

My WebAPI is based on the windows authorization, and the webapi is in the computer IIS,
and my web site is in the another computer IIS, so when I used to use chunk upload, I need to add header  with the credentials is true.

When I upload the file that file size is larger than chunk size, it doestnot work when process the second save parts, only the first save file part is success.
I posted a thread in last year, and I updated the syncfusion to lastest, but the problem is still exists.

Please fix this problem in hurry, and reply to me the fixed ETD, thanks!





The first upload part is success:


But the second part is 401 error:




3 Replies

PO Prince Oliver Syncfusion Team June 11, 2019 09:10 AM UTC

Hello Lorryl, 

Good day to you. 

We have checked your reported scenario. You have used the uploading event to add additional headers in the chunk uploader and hence you are facing this issue. We have provided chunkUploading event which fires for every chunk upload process gets started. To add the additional parameter with the current request, we suggest you add the headers in the chunkUploading event. Please refer the below code snippet. 

[html] 
<ejs-uploader #chunkupload id='chunkfileupload' [maxFileSize]=104857600 [autoUpload]=false [asyncSettings]='path' [dropArea]='dropElement' (pausing)='onPausing($event)' (resuming)='onResuming($event)' (removing)='onFileRemove($event)'(chunkFailure)='onBeforefailure($event)' (chunkUploading)='onChunkuploading($event)'> </ejs-uploader> 


[ts] 
public onChunkuploading(args: any): void { 
  if (args.currentRequest) { 
    args.currentRequest.withCredenials = true; 
  } 
} 

Please check the above solution in your end and let us know if you need any further assistance on this. 

Regards, 
Prince 



LO lorryl July 4, 2019 08:01 AM UTC

Hi,

The "ChunkUploading" is working fine, thank you very much!

Another question:
I want to call the upload file save function of the web API in windows applications with the C# code, 
how to loop to call the upload file save function because it's chunk uploading, do you have a demo in c#?



FP Farjana Parveen Ayubb Syncfusion Team July 5, 2019 12:28 PM UTC

Hi Lorryl, 
 
Thanks for your update. 
 
We have analyzed your query, but this is not related to our Syncfusion controls. You can check the below link for further reference of your query. 
 
 
Regards, 
Farjana Parveen A 


Loader.
Live Chat Icon For mobile
Up arrow icon