Min_Khant_Saw's avatar

How to make large video file uploads or downloads resumable

I want to handle uploading and downloading large video files from S3 in a way that supports resuming if the client experiences network interruptions or other issues.

If the upload or download is interrupted, the client should be able to resume from the last completed part instead of starting over. I want to know the best practices or tools in Laravel (and optionally JavaScript/React/Inertia) to achieve resumable uploads and downloads.

How can I implement this functionality efficiently for large files stored on S3?

0 likes
3 replies
Min_Khant_Saw's avatar

I found your multipart upload suggestion really helpful thanks for sharing it. After digging into it a bit more, I came across a Laravel package that makes the process much simpler.

This library integrates nicely with Laravel’s built-in storage system and feels more straightforward to use:

https://github.com/mreduar/s3m

It looks like a good fit for handling large file uploads with S3 in a more Laravel-friendly way.

martinbean's avatar

@min_khant_saw You don’t want a Laravel package, though. You want to do this client-side, i.e. upload the file direct to S3 using a pre-signed URL. Otherwise you’ve got to upload the file to your server, and then transfer it from your server to Amazon’s server, doubling the upload time (and increasing your storage and transfer costs). This is why I specifically mentioned JavaScript libraries.

Please or to participate in this conversation.