File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,10 @@ impl Builder for SwiftBuilder {
148148
149149 write : true ,
150150 write_can_empty : true ,
151+ write_with_content_type : true ,
152+ write_with_content_disposition : true ,
153+ write_with_content_encoding : true ,
154+ write_with_cache_control : true ,
151155 write_with_user_metadata : true ,
152156
153157 delete : true ,
Original file line number Diff line number Diff line change @@ -121,6 +121,19 @@ impl SwiftCore {
121121
122122 let mut req = Request :: put ( & url) ;
123123
124+ if let Some ( content_type) = args. content_type ( ) {
125+ req = req. header ( header:: CONTENT_TYPE , content_type) ;
126+ }
127+ if let Some ( content_disposition) = args. content_disposition ( ) {
128+ req = req. header ( header:: CONTENT_DISPOSITION , content_disposition) ;
129+ }
130+ if let Some ( content_encoding) = args. content_encoding ( ) {
131+ req = req. header ( header:: CONTENT_ENCODING , content_encoding) ;
132+ }
133+ if let Some ( cache_control) = args. cache_control ( ) {
134+ req = req. header ( header:: CACHE_CONTROL , cache_control) ;
135+ }
136+
124137 // Set user metadata headers.
125138 if let Some ( user_metadata) = args. user_metadata ( ) {
126139 for ( k, v) in user_metadata {
You can’t perform that action at this time.
0 commit comments