File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -205,9 +205,11 @@ impl S3Storage {
205205 let mut b =
206206 self . get_client ( ) . await . put_object ( ) . bucket ( self . bucket . clone ( ) ) . key ( key) ;
207207
208- if let Some ( ct) = content_type {
209- b = b. content_type ( ct)
210- } ;
208+ if settings. unsafe_use_metadata ( ) {
209+ if let Some ( ct) = content_type {
210+ b = b. content_type ( ct)
211+ } ;
212+ }
211213
212214 if settings. unsafe_use_metadata ( ) {
213215 for ( k, v) in metadata {
@@ -312,9 +314,12 @@ impl Storage for S3Storage {
312314 . put_object ( )
313315 . bucket ( self . bucket . clone ( ) )
314316 . key ( key)
315- . content_type ( "application/yaml" )
316317 . body ( config. into ( ) ) ;
317318
319+ if settings. unsafe_use_metadata ( ) {
320+ req = req. content_type ( "application/yaml" )
321+ }
322+
318323 match (
319324 previous_version. etag ( ) ,
320325 settings. unsafe_use_conditional_create ( ) ,
You can’t perform that action at this time.
0 commit comments