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

Does File Upload load files to memory before sending them?

I need to know if File Upload reads files to memory before being able to send the data somewhere?

What I need to do is to upload a large (+3GB)  files directly to Azure Blob Storage from my browser and I don´t want to read the file into memory before sending it.

There are some limitations in how Microsoft does this and I´m wondering if your component has the same limitations? 

Some have overcome the issue by using XMLHttpRequest. How do you do this?



4 Replies

Sturla Þorvaldsson February 10, 2023 08:58 AM UTC

Any change getting information about this? I need to know if your component is loading the files first into browsers memory before I can stream the file. If it does it looks like I need to do this my self with javascript


Except if you have a component or File Upload has functionality to directly upload to blobstorage.




DR Deepak Ramakrishnan Syncfusion Team February 10, 2023 12:08 PM UTC

Hi All,


Thanks for contacting Syncfusion support.


Query :

“What I need to do is to upload a large (+3GB)  files directly to Azure Blob Storage from my browser and I don´t want to read the file into memory before sending it.”


“Any change getting information about this? I need to know if your component is loading the files first into browsers memory before I can stream the file. If it does it looks like I need to do this my self with javascript


Our uploader component load the files into the browser's memory before uploading them to the server. This process helps ensure the reliability of the file transfer and prevents data loss. I understand that you require a direct upload to Azure Blob Storage from your browser without reading the file into memory first. Unfortunately, this is not a recommended way to upload files into azure blob . Hope the below references will help you for better understanding


https://www.syncfusion.com/forums/160405/sfuploader-working-with-azure-storage-blobs?reply=SoVvPe


https://learn.microsoft.com/en-us/aspnet/core/blazor/file-uploads?view=aspnetcore-7.0&pivots=server


Also, currently our uploader accepts the files with 2GB size , But we have already considered the requirement as feature at our end , It will be available in any one of our upcoming releases. You can track the status by using the below link.


https://www.syncfusion.com/feedback/34718/need-to-provide-support-for-uploading-files-with-size-greater-than-2gb



Thanks,

Deepak R.



Sturla Þorvaldsson February 10, 2023 01:20 PM UTC

Thank you for you answer. This is still unclear (though I understand that your component reads all to memory)

Your comment on " ...direct upload to Azure Blob Storage from your browser without reading the file into memory first. Unfortunately, this is not a recommended way to upload files into azure blob . "

But is that not what this javascript code from Microsoft is doing, right? Quickstart: Azure Blob storage library v12 - JS Browser - Azure Storage | Microsoft Learn

My general understanding was that reading large files into memory would significantly impact the performance of the browser and potentially lead to stability issues, so it was recommended to avoid reading large files into memory whenever possible and was better to stream the data .

Second, is your upload file size max 2GB? That is probably because of browser tab limit of 2GB (Chrome/Edge. Firefox can 4GB)? So if you were to upload a file bigger than 2GB by loading it to memory its not possible?

Regarding going directly to blob might not be the correct direction to go.. but maybe using Azure Function instead is?



UD UdhayaKumar Duraisamy Syncfusion Team February 20, 2023 07:41 AM UTC

Query 1:

But is that not what this javascript code from Microsoft is doing, right? Quickstart: Azure Blob storage library v12 - JS Browser - Azure Storage | Microsoft Learn

My general understanding was that reading large files into memory would significantly impact the performance of the browser and potentially lead to stability issues, so it was recommended to avoid reading large files into memory whenever possible and was better to stream the data .

 

You can refer to the below sample and the Syncfusion blog post regarding your query.

Sample Link: https://github.com/SyncfusionExamples/upload-files-to-azure-using-blazor-file-upload/

Blog Link: https://www.syncfusion.com/blogs/post/simple-steps-to-upload-files-to-azure-blob-storage-in-blazor-app.aspx


Query 1:

Second, is your upload file size max 2GB? That is probably because of browser tab limit of 2GB (Chrome/Edge. Firefox can 4GB)? So if you were to upload a file bigger than 2GB by loading it to memory its not possible?

Regarding going directly to blob might not be the correct direction to go.. but maybe using Azure Function instead is?

 

As we mentioned earlier, we have considered “Need to provide support for uploading files with size greater than 2GB” as a feature on our end. Once this feature is implemented, you can be able to upload files independently irrespective of the browser’s memory limits.

 

Feedback link for your reference:

https://www.syncfusion.com/feedback/34718


Loader.
Live Chat Icon For mobile
Up arrow icon