Chunk upload without webapi endpoint

Hi Support,

On my tests, OnChange event is not fired until the file is full uploaded to the browser. But, I would like to get files just when the user drop them into control, I prefer to avoid load the whole stream into browser memory, I want to pull the stream by myself. Is there an event to work in this way?

I know it exists chunk option, but this options requires a webapi endpoint. Would be wonderful to send just a delegate function instead of an url:


<UploaderAsyncSettings SaveDelegate="@MyDelegaterFunction" ChunkSize="500000">

Summarizing, how to deal with chunk upload without webapi endpoint? 

8 Replies 1 reply marked as answer

PM Ponmani Murugaiyan Syncfusion Team April 8, 2021 01:50 PM UTC

Hi Josep, 

Thanks for contacting Syncfusion support. 

We would like to let you know that by default in uploader component without API endpoints, we merge the file stream for each chunk and then updated in the change event finally. This was achieved as an inbuild in our source code. As a result, it will have no impact on your browser's memory. For your convenience, we have prepared a sample and attached below. 

 
Please check with the sample above, whether it meets your requirements. If you have any queries or having trouble in meeting your requirements, please revert us with your query details, we will assist you further. 

Regards, 
Ponmani M 



JR Josep Ramon Chicano April 9, 2021 07:53 AM UTC

I run your code, and I'm unable to make the test because 'File size is too large' error appears, I have changed it to:

<SfUploader MaxFileSize="Double.MaxValue" AutoUpload="false">

Then, I tested with a large file (5Gb), see my video, and, while progress bar is increasing the chrome memory usage doesn't grow as you explained, right.

The issue is that I don't understand what the SF control is doing on 'uploading' time, until the progress bar does not achieve 100% the event ValueChange is not raised. If the SF control isn't loading the file in memory, what is it doing? Why I should to wait until 100% to get the file? Why I can't have the stream early?

Notice that when progress bar is at 100% a message of successfully loaded appears, but, at this point, the file is just starting to save to disk, if user says 'ok my file is uploaded' and closes navigator, the file is not stored on backend.

Best regards.




Attachment: f96_upload_e2301334.7z


PM Ponmani Murugaiyan Syncfusion Team April 13, 2021 02:30 AM UTC

Hi Josep, 

Currently we are checking the reported query. We will update further details on tomorrow. 

Regards, 
Ponmani M 



PM Ponmani Murugaiyan Syncfusion Team April 14, 2021 06:38 AM UTC

Hi Josep, 

Thanks for your patience. 

We confirmed the reported requirement "Provide event to get the every chunk file stream when uploading the file without API endpoint options" as improvement in our end and the feature will be available in one of the upcoming patch release which is expected to be rolled out on April 27, 2021. You can track the status of the feature in the below feedback link from below.       


We appreciate your patience until then. 

Regards, 
Ponmani M


JR Josep Ramon Chicano May 25, 2021 10:41 AM UTC

It looks that the feature is full implemented, Great!

I don't found documentation about `Progressing` event. Are you so kind to provide the link to documented `Progressing` event or/and, maybe, a sample to know how to save file by chunks using `Progressing` event?

Regards


PM Ponmani Murugaiyan Syncfusion Team May 26, 2021 04:33 PM UTC

Hi Josep, 

Thanks for the update. We are glad to know that the provided support helps you meets your requirement. We will include this information in our documentation soon and update you the sample in 1 business days. 

Regards, 
Ponmani M 



PM Ponmani Murugaiyan Syncfusion Team June 2, 2021 02:48 AM UTC

Hi Josep, 

Sorry for the inconvenience caused. 

We will prepare sample as per your requirement and update in 2 business days (June 4, 2021). We appreciate your patience until then. 

Regards, 
Ponmani M 



PM Ponmani Murugaiyan Syncfusion Team June 7, 2021 02:43 AM UTC

Hi Josep, 

Thanks for the patience. 

We have passed the stream for every chunk in progressing event argument. Now, you can get the stream while uploading as per your requirement. 

 


Regards, 
Ponmani M 


Marked as answer
Loader.
Up arrow icon