in src/tasks/S3Upload/TaskOperations.ts [88:127]
private buildS3Request(request: S3.PutObjectRequest, matchedFile: string) {
if (this.taskParameters.contentEncoding) {
request.ContentEncoding = this.taskParameters.contentEncoding
}
if (this.taskParameters.cacheControl && this.taskParameters.cacheControl.length > 0) {
const cacheControl = this.getCacheControl(matchedFile)
if (cacheControl) {
request.CacheControl = cacheControl
}
}
if (this.taskParameters.filesAcl) {
request.ACL = this.taskParameters.filesAcl
}
switch (this.taskParameters.keyManagement) {
case noKeyManagementValue:
break
case awsKeyManagementValue: {
if (this.taskParameters.encryptionAlgorithm) {
request.ServerSideEncryption = this.taskParameters.encryptionAlgorithm
}
if (this.taskParameters.kmsMasterKeyId) {
request.SSEKMSKeyId = this.taskParameters.kmsMasterKeyId
}
break
}
case customerKeyManagementValue: {
if (this.taskParameters.encryptionAlgorithm) {
request.SSECustomerAlgorithm = this.taskParameters.encryptionAlgorithm
}
if (this.taskParameters.customerKey.length > 0) {
request.SSECustomerKey = this.taskParameters.customerKey
}
break
}
}
}