1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-31 07:33:33 +00:00

fixup! lib/rest: add opts.MultipartContentType to explicitly set Content-Type of attachements FIXME WIP

This commit is contained in:
Nick Craig-Wood
2025-12-11 17:48:42 +00:00
parent 4d858210b3
commit 8e94a154ed
7 changed files with 9 additions and 25 deletions

View File

@@ -1327,7 +1327,7 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
// opts.Body=0), so upload it as a multipart form POST with
// Content-Length set.
if size == 0 {
formReader, contentType, overhead, err := rest.MultipartUpload(ctx, in, opts.Parameters, "content", leaf)
formReader, contentType, overhead, err := rest.MultipartUpload(ctx, in, opts.Parameters, "content", leaf, opts.ContentType)
if err != nil {
return fmt.Errorf("failed to make multipart upload for 0 length file: %w", err)
}