mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-17 16:50:22 +00:00
allow dynamic value
This commit is contained in:
parent
3c59e234c5
commit
2603292de0
3 changed files with 9 additions and 8 deletions
|
|
@ -752,8 +752,8 @@ export default class Uploader {
|
|||
|
||||
if (options.acl != null) params.ACL = options.acl
|
||||
|
||||
if (options.enableAwsSseKms === true) {
|
||||
params.ServerSideEncryption = 'aws:kms'
|
||||
if (options.awsSse != null) {
|
||||
params.ServerSideEncryption = options.awsSse
|
||||
}
|
||||
|
||||
if (options.awsSseKmsKeyId) {
|
||||
|
|
|
|||
|
|
@ -95,12 +95,13 @@ export default function s3(config) {
|
|||
|
||||
if (config.acl != null) fields.acl = config.acl
|
||||
|
||||
if (config.enableAwsSseKms === true) {
|
||||
fields['x-amz-server-side-encryption'] = 'aws:kms'
|
||||
if (config.awsSse != null) {
|
||||
fields['x-amz-server-side-encryption'] = config.awsSse
|
||||
}
|
||||
|
||||
if (config.awsSseKmsKeyId) {
|
||||
fields['x-amz-server-side-encryption-aws-kms-key-id'] = config.awsSseKmsKeyId
|
||||
fields['x-amz-server-side-encryption-aws-kms-key-id'] =
|
||||
config.awsSseKmsKeyId
|
||||
}
|
||||
|
||||
Object.keys(metadata).forEach((metadataKey) => {
|
||||
|
|
@ -186,8 +187,8 @@ export default function s3(config) {
|
|||
|
||||
if (config.acl != null) params.ACL = config.acl
|
||||
|
||||
if (config.enableAwsSseKms === true) {
|
||||
params.ServerSideEncryption = 'aws:kms'
|
||||
if (config.awsSse != null) {
|
||||
params.ServerSideEncryption = config.awsSse
|
||||
}
|
||||
|
||||
if (config.awsSseKmsKeyId) {
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ const getConfigFromEnv = () => {
|
|||
process.env.COMPANION_AWS_USE_ACCELERATE_ENDPOINT === 'true',
|
||||
expires: parseInt(process.env.COMPANION_AWS_EXPIRES || '800', 10),
|
||||
acl: process.env.COMPANION_AWS_ACL,
|
||||
enableAwsSseKms: process.env.COMPANION_ENABLE_AWS_SSE_KMS === 'true',
|
||||
awsSse: process.env.COMPANION_AWS_SSE,
|
||||
awsSseKmsKeyId: process.env.COMPANION_AWS_SSE_KMS_KEY_ID,
|
||||
forcePathStyle: process.env.COMPANION_AWS_FORCE_PATH_STYLE === 'true',
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue