mirror of
https://github.com/rclone/rclone.git
synced 2026-08-07 05:22:48 -04:00
azureblob,memory,pcloud: fix setting of mime types
Before this change the backend was reading the mime type of the destination object instead of the source object when uploading. This changes fixes the problem and introduces an integration test for it. See: https://forum.rclone.org/t/is-there-a-way-to-get-rclone-copy-to-preserve-metadata/20682/2
This commit is contained in:
1 parent
19a8b66cee
commit
dfadd98969
4 files changed
+195
-151
No files matched your search
@@ -1117,7 +1117,7 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
|
||||
Method: "PUT",
|
||||
Path: "/uploadfile",
|
||||
Body: in,
|
||||
ContentType: fs.MimeType(ctx, o),
|
||||
ContentType: fs.MimeType(ctx, src),
|
||||
ContentLength: &size,
|
||||
Parameters: url.Values{},
|
||||
TransferEncoding: []string{"identity"}, // pcloud doesn't like chunked encoding
|
||||
|
||||
Reference in new issue
Block a user