@@ -929,16 +929,17 @@ export class FailsAssets {
929
929
const path = 'https://' + host + uri
930
930
const date = new Date ( )
931
931
const length = input ?. length || size
932
- const headers = {
932
+ let headers = {
933
933
'Content-Length' : String ( length ) ,
934
934
'Content-Type' : mime ,
935
935
Date : date . toUTCString ( ) ,
936
936
Host : host ,
937
937
'x-amz-content-sha256' : shahex
938
938
}
939
939
const contentDisposition = this . mimeToContentDisposition ( mime )
940
- if ( contentDisposition )
941
- headers [ 'Content-Disposition' ] = contentDisposition
940
+ if ( contentDisposition ) {
941
+ headers = { 'Content-Disposition' : contentDisposition , ...headers }
942
+ }
942
943
let response
943
944
try {
944
945
headers . Authorization = this . s3AuthHeader ( {
@@ -1047,16 +1048,17 @@ export class FailsAssets {
1047
1048
const date = new Date ( )
1048
1049
const length = size
1049
1050
const unsignedHash = 'UNSIGNED-PAYLOAD'
1050
- const headers = {
1051
+ let headers = {
1051
1052
'Content-Length' : String ( length ) ,
1052
1053
'Content-Type' : mime ,
1053
1054
Date : date . toUTCString ( ) ,
1054
1055
Host : host ,
1055
1056
'x-amz-content-sha256' : unsignedHash
1056
1057
}
1057
1058
const contentDisposition = this . mimeToContentDisposition ( mime )
1058
- if ( contentDisposition )
1059
- headers [ 'Content-Disposition' ] = contentDisposition
1059
+ if ( contentDisposition ) {
1060
+ headers = { 'Content-Disposition' : contentDisposition , ...headers }
1061
+ }
1060
1062
1061
1063
headers . Authorization = this . s3AuthHeader ( {
1062
1064
headers,
0 commit comments