-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set public visibility to each file for digitalocean spaces ? (s3 driver) #1018
Comments
Add visibility header in config file.
|
@thisiskaden Thanks ! |
@thisiskaden @netanelwebninja this worked for the main file. but conversion and responsive images still are still private. how do you guys handle conversions and responsive images? Update Found the solution. I was running jobs with horizon and after restart the horizon daemon it cached the proper headers. Looks like jobs cache the current state of the code and if any changes it wont be applied to jobs after restart the daemon |
Hi, i just migrated from S3 to Digitalocean. Now i have the problem that every asset is private. |
@dominikager I think you can set |
Is there a way to set this per upload and not globally ? |
I haven't tested it but I think you need to add 'public' as a third parameter, as shown below:
|
But this doesn't use media library or I'm not getting it. |
Sorry I forgot this was in spatie/laravel-medialibrary, I ended up here because I was looking for a general Laravel solution.
Try this: #241 (comment) <#241 (comment)>
… On 30 Mar 2021, at 08:07, petsoukos ***@***.***> wrote:
I haven't tested it but I think you need to add 'public' as a third parameter, as shown below:
$path = Storage::disk('s3')->put('directory_name/'.$user->id, $request->file('file_name'), 'public');
But this doesn't use media library or I'm not getting it.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#1018 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB5IVPWKYPJL44C7MTRYY7TTGF2DJANCNFSM4EYUEUAA>.
|
thanks. its worked |
Hey,
I have Laravel 5.6 app, Im using digitalocean spaces for filesystem driver (its like s3, using same s3 driver for laravel).
I installed the laravel-medialibrary package, and upload files, works like a charm.
The problem is that all the files that uploaded to Digitalocean spaces are private, normally when I use laravel Storage facade I fix it using Storage:: setVisibility but I didnt found a way to do it with medialibrary.
I just want all the uploaded files to be visibility = public
Thanks
The text was updated successfully, but these errors were encountered: