Uploading large file with resume capability

Hi guys,

I had success on file upload with waffle. But my particular problem is when uploading large files and capable of resume. I’m thinking if this can be done in Elixir Stream and continuously append the chunks into the existing file. Also, I could compute and show how much percentage has been uploaded in the frontend.

What are the best library for handling this in frontend?

Any idea on what is the best approach on this?

Hey, welcome.

There is at least one protocol specifically for this: https://tus.io/

I haven’t implemented it in Elixir, but from what I recall it involves setting up a separate server that your form posts the data to that supports resuming in the case of an interrupted connection. You then retrieve the file via a URL. I’m not sure if Waffle integrates with it, it would likely be something you use alongside/with Waffle (by passing the ID returned by the TUS server for Waffle to copy/move the completed file).

Looks like this is what I need. However, the repo for elixir server implementation listed on the website has been deleted. I’ll try tusd for now. Thanks.