I have a requirement to implement a feature that allows users to upload image files. I’m currently using LiveView in Phoenix for this, enabling direct uploads from the client to the cloud. However, there are additional specific requirements that need to be addressed:
The feature should support resumable uploads. For example, if a user starts uploading a batch of 1000 images and the upload process is interrupted due to internet connectivity issues, it should be able to resume seamlessly from where it left off once the connection is restored.
Users should have the flexibility to navigate to other LiveViews while an upload is in progress. This means that even if a user initiates the upload of 1000 files and then decides to navigate to a different page, the upload process should continue running in the background without being disrupted.
Users should be able to simultaneously upload files to multiple galleries. This entails scenarios where a user may begin uploading 1000 files for one gallery, initiate the upload, and then proceed to another gallery to upload additional files. Each gallery’s upload process should work independently and concurrently.
In case a user starts uploading files and their laptop enters sleep mode shortly thereafter, upon waking up the laptop, the upload should automatically resume from where it left off.
Can it be handled by web workers at the client side, Are there any pros and cons to handling all this at the client side?