This subject has been debated in previous topics but I couldn't find a final answer.
Is it or is it not possible to use this widget for reactive to upload big files (1-2 GB)?
hi José,
I think is possible. i already use this plugin for files with +/-500mb..
I'm not able to upload anything over 100MB.
Do you have anything in the configuration to manage that?
Set this to '0'
By default, that property is set to 0.
This is the error I get when upload fails
The error is during the upload or when you submit to the server?
It stopped around 72% of upload.
I made a test with a file (180mb and in client it works) can you please test in this link?
https://fafvaz.outsystemscloud.com/ReactFilePondUpload_Demo/Upload
I tested with Chrome and it didn't work.
Tested with Firefox a few times and it did upload well a file with 139.5MB once, but failed others. Still I tested with a 200+MB file and it failed in Firefox too.
Hi Jose,
Would you be able to open chrome dev tools and show the network tab during the upload?
Also could you switch on debugging in the component and post the console logs?
This might give us a better idea of what is going wrong for you.
Kind regards,
Stuart
Hi Stuart,
Thanks.
Thank you, that really helps. I can see what is going on here now.
The timeout is set to the default value of 30 seconds. So when the upload of a chunk takes longer than 30 seconds, the request times out. It is showing up as (canceled) status.
The solution is to update the UploadFileTimeoutSeconds Site property for the ReactFilePondUpload_CW module.
"The timeout for the server action called from the client that uploads a file chunk. Valid values are 30, 60, 120, and 180. Any other values will fail.
If timeouts are occurring, increase this timeout value."
It is in the documentation, but there is alot to go through before you find it, so not surprised it wasn't obvious.
Oh, and if you're wondering "Why not just set the upload action to the maximum?" which would be entirely reasonable. The OutSystems review team was concerned that allowing a long timeout by default would be a security risk, opening up to a possible denial of service attack; and fair enough. By setting the value to 30 seconds gives 90% of the users of the component what they need. I was adamant that we needed to allow users to upload large files (so thanks for proving that for me!), so I added the configuration item to allow longer uploads which was accepted by the review team. Also the reason it has to be specific values is because the server actions can only be hardcoded to a timeout, so it actually uses a different server action for 60s, 120s and 180seconds timeouts (you can see this in the code).
Hope this helps!
Increased timeout to 60 and worked well with a 200MB.
But for bigger files over 1GB still failed. I changed timeout to 180 and reduced chunk sizes to minimize timeouts.
But sometimes a chunk takes much longer than usual and the upload fails.
Thanks for the awesome info and investigation.
My best guess is this behaviour is related to the performance of the environment. Our personal environments don't have great performance. I expect you won't have to make those changes on a paid environment. However, I am only speculating here.
I still could add further longer timeouts above 300.
By reducing the size of the chunks, the long uploads will take longer in total, but I guess they are already taking a long time. I could add an option to use smaller chunk sizes.
What would you like?
So you think this is related to my personal environment instead of some short outage of my wifi connection. I will have to try it in the professional environment as soon as it is available for this project anytime soon.
I think the improvement this component could have is including the site properties inside the upload config structure, so the developer can have more options to manage its needs.
About the chunk size config probably won't be necessary, unless we are talking about really big files (> 2,5GB).
I will update the status as soon as I test in a professional environment.
Best regards
Great thanks Jose.
I would be keen to hear how you go.
The reason I think personal environment, is I found when testing large files, my database got close to capacity, and the whole environment slowed down dramatically. But I do not know for sure. If you are having an outage of wi-fi, the upload will fail no matter what we do.
Thanks for mentioning the upload config/site properties.
The reason they are site properties is so that they can be configured without having to do a software deploy. For example, if you users start reporting file upload issues, you can immediately update the site property instead of scheduling a release.
Hello,
I'm posting here because I believe I'm running into the same issue.
In my use case, the application needs to support image uploads of up to 30 MB. After the upload, the image is stored in Azure Blob Storage so I can immediately display a preview to the user in my block.
Once the upload completes, I trigger the preview block. Uploads work fine with smaller images (around 1 MB), but I start running into problems with files around 20 MB and above.
I've attached a screenshot of the Network tab in the browser's Developer Tools while uploading a 30 MB image. The upload does complete successfully, but the resulting image in Azure is corrupted, as shown in the screenshot.
I also tried to increase the site property to 180 but the problem still occurs.Any clues?
I managed to find the solution. Changed the default value of MaxParallelUploadsPerFile to 1. Above 1 was corrupting the files in Azure.