Hi, I am using Uppy on my react client side and Companion on node.js. I’m trying to pass some data to my Companion from my client. I read about serverHeaders but am not quite sure how to use it.
Client-side code:
Uppy()
.use(AwsS3, {
limit: 2,
companionUrl: 'http://localhost:5000',
// some additional data here
})
back-end
const options = {
providerOptions: {
s3: {
getKey: (req, filename) => //data passed from client,
key: process.env.AWS_ACCESS_KEY,
secret: process.env.AWS_SECRET_KEY,
bucket: 'honeybee-chat',
region: 'us-east-1'
}
},
server: {
host: 'localhost:3000',
protocol: 'http',
},
filePath: './downloads',
secret: 'jgovipawajefa'
}
Also, is there a way to change the bucket destination based on information from the front-end?
Thanks