When using Transloadit, you do the following on a template.
"exported": {
"robot": "/minio/store",
"use": ":original",
"path": "${fields.userId}/${file.id}.${file.ext}",
"credentials": "tigris_prod",
"headers": {
"Content-Type": "${file.mime}",
"Cache-Control": "max-age=31536000"
}
}
I’m just looking to do the same when using Tus server with the S3Store.
const server = new Server({
path: "/files",
allowedOrigins: allowedOrigins,
datastore: new S3Store({
s3ClientConfig: {
endpoint: S3_ENDPOINT,
region: "auto",
bucket: S3_BUCKET,
credentials: {
accessKeyId: process.env.S3_ACCESS_KEY_ID,
secretAccessKey: process.env.S3_SECRET_ACCESS_KEY,
},
// set default headers here?
},
}),
...
})