How can file upload can be done in background using liveview?

I have lot of images, it took much time to upload. so what i want is that user select images and start uploading, after that uploading should be moved to background and user can continue his work on other pages. i have implemented uploading but when user switch to other page, state lost and images stop uploading. is there any way to handle this kind of case. Any help will be very appreciated. Thank you

I haven’t tried this, just off the top of my head, could you use something like the new :sticky flag to maintain the LivewView where you’re doing the upload? Here’s the docs on it.

3 Likes

One idea off the hip is to create a hidden stateful liveview component.

I’ve also found direct uploads via clients and signed urls to be a huge help with asset uploading.
That extra round trip to the server can be really expensive when dealing with in ram usage.