mirror of
https://github.com/strapi/strapi.git
synced 2025-09-10 17:17:19 +00:00
fix: add only credentials object when credentials are present
This commit is contained in:
parent
d87a9b3b6b
commit
af5a6e37b2
@ -76,11 +76,11 @@ const getConfig = ({ baseUrl, rootPath, s3Options, ...legacyS3Options }: InitOpt
|
|||||||
"S3 configuration options passed at root level of the plugin's providerOptions is deprecated and will be removed in a future release. Please wrap them inside the 's3Options:{}' property."
|
"S3 configuration options passed at root level of the plugin's providerOptions is deprecated and will be removed in a future release. Please wrap them inside the 's3Options:{}' property."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
const credentials = extractCredentials({ s3Options, ...legacyS3Options });
|
||||||
const config = {
|
const config = {
|
||||||
...s3Options,
|
...s3Options,
|
||||||
...legacyS3Options,
|
...legacyS3Options,
|
||||||
credentials: extractCredentials({ s3Options, ...legacyS3Options }),
|
...[credentials ? { credentials } : {}],
|
||||||
};
|
};
|
||||||
|
|
||||||
config.params.ACL = getOr(ObjectCannedACL.public_read, ['params', 'ACL'], config);
|
config.params.ACL = getOr(ObjectCannedACL.public_read, ['params', 'ACL'], config);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user