Hi, I am facing a challenge and would like to seek advice here. Any idea is welcome.
In the application, the user can upload a large file (client action, directly from browser to AWS S3) and it may take a while. The requirement is that during the uploading time, ideally, the uploading can be running at the background and still allow the users to navigate between pages within the app.
My initial idea is to build a single page application in reactive web app and creates an upload widget and put into menu widget. However, SPA may not be an option.
I am struggling to think any way in a typical reactive web app, how to make the file upload (client action) running in the background and not forcing users to wait until the completion of file upload.
Hi George.Qiao,
Why don't you use a timer to perform this activity? Save the uploaded file in an entity in binary format along with the file name, then trigger a timer using its wake method. In the timer, you can write your upload logic. Since the timer runs in the background, navigating to another screen will not affect its function.
You can add logs entity as well to enhance the user experience. I did a similar app where I process my uploaded excel in the backend. See the Entity model below.
Hi Pranav,
Unfortunately, in my project, uploading the large file to OS server is an option we want to avoid. And "Save the uploaded file in an entity in binary format " is a challenge by its own when dealing 1GB file size.
The preferred option is to stream a large file (1 GB) directly from the browser to AWS S3 PreSigned URL (the URLs are given by middleware. OS has no access to S3 bucket directly).
As you can imagine, even streaming data direct to S3 from the browser, the 1GB file may still take a long time to complete. That's why I hope to find a solution that can run the uploading process (client action with JavaScript) at the background and allow users to navigate to other pages without interrupting the file uploading.
Regards,
George Qiao
You are right, this cannot be applied in this case. I search through the forum I found that there is a limitation of 250 MB that is supported for file upload.
I also found that you have already commented on a similar issue before. I guess no solution is available at the moment for this. I will have to check for some other way but not sure as of now.
Forum discussion link
Just a thought. With files in that range i think it would make sense to offload the actual upload to an external application. That application could be triggered by a custom URI provider, where the OutSystems app redirects to the custom uri including parameters like the the presigned url.
That would also allow more complex upload scenarios (multipart, pausing and restarting uploads, mulithreading asf).
Hi George,
Were you able to find any viable solution for your problem?