#Issue with File Uploads Defaulting to Local Instead of S3 (Medusa 2.0)

7 messages · Page 1 of 1 (latest)

robust niche
#

Issue with File Uploads Defaulting to Local Instead of S3 (Medusa 2.0)

broken skiff
#

I also have some issues with this

#

modules: [
{
resolve: '@medusajs/medusa/file',
options: {
providers: [
...(S3_URL && S3_ACCESS_KEY_ID && S3_SECRET_ACCESS_KEY && S3_REGION && S3_BUCKET && S3_ENDPOINT ? [{
resolve: '@medusajs/medusa/file-s3',
id: 's3',
options: {
file_url: process.env.S3_URL,
access_key_id: process.env.S3_ACCESS_KEY_ID,
secret_access_key: process.env.S3_SECRET_ACCESS_KEY,
region: process.env.S3_REGION,
bucket: process.env.S3_BUCKET,
endpoint: process.env.S3_ENDPOINT,
additional_client_config: {
forcePathStyle: true,
}
}
}] : [])
]
}
}

flat hill
#

Did you get this working?

pure granite
#

do you have any other file providers defined?

broken skiff
#

i got this working by getting the new file-s3 packageand new version of medusa backend with typescript

#

{
resolve: "@medusajs/medusa/file",
options: {
providers: [
{
resolve: "@medusajs/medusa/file-s3",
id: "s3",
options: {
file_url: process.env.S3_FILE_URL,
access_key_id: process.env.S3_ACCESS_KEY_ID,
secret_access_key: process.env.S3_SECRET_ACCESS_KEY,
region: process.env.S3_REGION,
bucket: process.env.S3_BUCKET,
endpoint: process.env.S3_ENDPOINT,
},
},
],
},
},