Uploading to s3 via Media Manager

I’m trying to upload files to s3 via Media Manager and getting no errors (I also get a success message) but the files don’t appear in Media Manager or s3. Files that I have manually uploaded to s3 do appear in Media Manager.

This is my config in filesystems.php

'media' => [
            'driver' => 's3',
            'root' => 'media',
            'url' => 'https://***.s3.ap-southeast-2.amazonaws.com',
            'key' => '***',
            'secret' => '***',
            'region' => 'ap-southeast-2',
            'bucket' => '***',
            'visibility' => 'public',
            'throw' => false,
        ],

Hi @zimple.digital ,

Looking at the doc (Providers - October CMS - 3.x), is your URL missing the bucket name? Since there is also a key bucket, not sure if that could be the issue.

'disks' => [
    // ...
    'media' => [
        'url' => 'https://s3-us-west-2.amazonaws.com/your-bucket-name',
         ...
    ],
    // ...
]

Hi @apinard,

We normally reference the buckets as https://{bucketname}.s3.ap-southeast-2.amazonaws.com and have had that working for years with October 2. It’s only not working with October 3.

I’ve also tried https://s3-ap-southeast-2.amazonaws.com/{bucketname} on October 3 and get the same issues.

Thanks

We were able to solve this issue by enabling ACLs, which doesn’t make a lot of sense as that was not required previously with October 2 and is supposed to be a legacy feature of AWS S3.

The error was

Error executing "PutObject"
AccessControlListNotSupported - The bucket does not allow ACLs

We discovered the error by setting the ‘throw’ variable to true in the filesystems config as this causes s3 to throw errors instead of suppressing them.

1 Like