Aws-sdk-php: Failing to set access to public

Created on 11 Feb 2018  路  1Comment  路  Source: aws/aws-sdk-php

Just done composer update which has pulled in this latest version:

aws/aws-sdk-php (3.52.2 => 3.52.6)

My code which worked fine before (laravel):

$request->file->storeAs('photos/'.Auth::id(), $filename, 's3', 'public');

now fails to set the uploaded file to public.
My app breaks with the access denied on the photo on s3, the above line no longer sets it to public.
If I go to s3 console and manually change permissions to public and it works.

So, not sure if something changed/broke in the sdk.

Most helpful comment

Apologies: Laravel 5.5 (previously I was on 5.3) requires an additional config setting to achieve public visibility, which 5.3 apparently does not. In config/filesystems s3, adding: 'visibility' => 'public' solved this.

>All comments

Apologies: Laravel 5.5 (previously I was on 5.3) requires an additional config setting to achieve public visibility, which 5.3 apparently does not. In config/filesystems s3, adding: 'visibility' => 'public' solved this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andy3rdworld picture andy3rdworld  路  4Comments

aanton picture aanton  路  4Comments

sh-ogawa picture sh-ogawa  路  4Comments

carlalexander picture carlalexander  路  4Comments

chiukit picture chiukit  路  4Comments