AWS S3 upload not working on HEROKU

@Eventyret

Sorry but you gave a wrong answer.

Luckly I found a solution on github.

I hope people will find this post instead of spending sleepless nights trying to make it work…

SOLUTION

//plugins.js

module.exports = ({ env }) => ({
  // ...
  upload: {
    config: {             // <-- this is missing in the official docs
      provider: 'aws-s3',
      providerOptions: {
        accessKeyId: env('AWS_ACCESS_KEY_ID'),
        secretAccessKey: env('AWS_ACCESS_SECRET'),
        region: env('AWS_REGION'),
        params: {
          Bucket: env('AWS_BUCKET'),
        },
      },
    },
  },
  // ...
});