Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

webdav: add Content-Type to PUT requests - fixes #2664

Nick Craig-Wood9959c5f17f06
diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.go
index 9ba4839a3..be0423954 100644
--- a/backend/webdav/webdav.go
+++ b/backend/webdav/webdav.go
@@ -968,6 +968,7 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOptio
Body: in,
NoResponse: true,
ContentLength: &size, // FIXME this isn't necessary with owncloud - See https://github.com/nextcloud/nextcloud-snap/issues/365
+ ContentType: fs.MimeType(src),
}
if o.fs.useOCMtime {
opts.ExtraHeaders = map[string]string{