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

drive: preserve mime type on file update - fixes #417

Nick Craig-Wood6cc9c096107e
diff --git a/drive/drive.go b/drive/drive.go
index b4e159d8d..f1bca4059 100644
--- a/drive/drive.go
+++ b/drive/drive.go
@@ -1049,6 +1049,7 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo) error {
}
updateInfo := &drive.File{
Id: o.id,
+ MimeType: fs.MimeType(o),
ModifiedDate: modTime.Format(timeFormatOut),
}