Laravel-medialibrary: Using medialibrary with direct S3 uploaded files

Created on 9 May 2019  路  5Comments  路  Source: spatie/laravel-medialibrary

Hi! Thanks for the awesome library.

I have to upload ginormous video files (60GB or so) to an S3 server. Given the size of the files I want to avoid the double upload (user->laravel->S3) and I'd like the user to upload the files directly to Amazon (user->S3).

I have been working for a while in a way to upload the files directly from the browser and I finally have it working. Now the question is: How can I still associate those files uploaded directly to S3 to an object using laravel-medialibrary?

I've thought of creating new Media models and assigning their parameters manually, and to download the files just do it normally using the 's3' disk, but I don't know if that's the best way to do it.

Any suggestions?
Thanks!

Most helpful comment

I suppose this issue is solved? If you'd like to share your approach, we'd highly appreciate it!

All 5 comments

Please post your method

I ended up using the Amazon S3 JavaScript SDK to upload the files:
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html

I suppose this issue is solved? If you'd like to share your approach, we'd highly appreciate it!

Please do share, I am also curious about this. Thanks.

Your share will be much appreciated!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Nks picture Nks  路  3Comments

eichgi picture eichgi  路  3Comments

mohammad6006 picture mohammad6006  路  4Comments

brendt picture brendt  路  4Comments

xron89 picture xron89  路  3Comments