Missing required key 'Bucket' in params


#1

I get this error when uploading an image to s3

My controller

async uploadPhoto({request, response}){
        request.multipart.file('profile_pic', {}, async (file) => {
            console.log(file)
            await Drive.disk('s3').put(file.clientName, file.stream)
        })
        
        await request.multipart.process()
    } 

config/storage.js

const Env = use('Env')

module.exports = {

  disk: Env.get('STORAGE_DISK', 'fs'),

  disks: {
    fs: {
      driver: 'fs'
    },

    s3: {
      driver: 's3',
      key: Env.get('AWS_ACCESS_KEY_ID'),
      secret: Env.get('AWS_SECRET_ACCESS_KEY'),
      region: Env.get('AWS_REGION'),
      bucket: 'best-ride'
    },

    s3Public: {
      driver: 's3',
      key: Env.get('AWS_ACCESS_KEY_ID'),
      secret: Env.get('AWS_SECRET_ACCESS_KEY'),
      region: Env.get('AWS_REGION'),
      bucket: 'public-bucket-name'
    }

  }

}

I appreciate your collaboration


#2

Hey @antojsh! :wave:

I don’t have any issue on my side.
Could you try to create a repository with the minimum amount of code to reproduce the issue?