Laravel-medialibrary: Upload files from a non-local disk

Created on 2 Oct 2019  路  7Comments  路  Source: spatie/laravel-medialibrary

It doesn't seem possible to use addMedia with files from non-local disks, such as s3. Is this intentional, or am I doing something wrong?

Most helpful comment

Having the same issue - though the issue is not uploading to a separate disk, but uploading from. My use case right now is uploading an avatar via Laravel Vapor S3 stream (all handled on the client), and then on the server I want media-library to add the file that already exists in the S3 bucket in the /tmp directory. Something like addMedia('tmp/something', 's3') would be good.

All 7 comments

Having the same issue - though the issue is not uploading to a separate disk, but uploading from. My use case right now is uploading an avatar via Laravel Vapor S3 stream (all handled on the client), and then on the server I want media-library to add the file that already exists in the S3 bucket in the /tmp directory. Something like addMedia('tmp/something', 's3') would be good.

@freekmurze, sorry if I wasn't clear. What @jameslkingsley described is what I'm looking for - uploading files from a non-local disk.

Right... I think support for this should be added to the medialibrary. Currently I don't have time to look into it. If you need this quick, I'd accept a PR with tests and updated docs that adds support for this to the package.

I'm currently working on getting a quick solution built into this package

Any progress on that?

Dear contributor,

because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

denitsa-md picture denitsa-md  路  3Comments

stayallive picture stayallive  路  4Comments

jam1e picture jam1e  路  3Comments

snapey picture snapey  路  3Comments

Nks picture Nks  路  3Comments