"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
jottacloud: Add optional MimeTyper interface.
Sebastian Bünger86e3436d5538
diff --git a/backend/jottacloud/api/types.go b/backend/jottacloud/api/types.goindex 2f2ae0dfb..22d7d711e 100644--- a/backend/jottacloud/api/types.go+++ b/backend/jottacloud/api/types.go@@ -241,6 +241,7 @@ type JottaFile struct {ModifiedAt Time `xml:"currentRevision>modified"`Updated Time `xml:"currentRevision>updated"`Size int64 `xml:"currentRevision>size"`+ MimeType string `xml:"currentRevision>mime"`MD5 string `xml:"currentRevision>md5"`}diff --git a/backend/jottacloud/jottacloud.go b/backend/jottacloud/jottacloud.goindex 59a8ba697..8fd62d41e 100644--- a/backend/jottacloud/jottacloud.go+++ b/backend/jottacloud/jottacloud.go@@ -104,6 +104,7 @@ type Object struct {size int64modTime time.Timemd5 string+ mimeType string}// ------------------------------------------------------------@@ -688,11 +689,17 @@ func (o *Object) Size() int64 {return o.size}+// MimeType of an Object if known, "" otherwise+func (o *Object) MimeType() string {+ return o.mimeType+}+// setMetaData sets the metadata from infofunc (o *Object) setMetaData(info *api.JottaFile) (err error) {o.hasMetaData = trueo.size = int64(info.Size)o.md5 = info.MD5+ o.mimeType = info.MimeTypeo.modTime = time.Time(info.ModifiedAt)return nil}@@ -891,10 +898,11 @@ func (o *Object) Remove() error {// Check the interfaces are satisfiedvar (- _ fs.Fs = (*Fs)(nil)- _ fs.Purger = (*Fs)(nil)- _ fs.Copier = (*Fs)(nil)- _ fs.Mover = (*Fs)(nil)- _ fs.DirMover = (*Fs)(nil)- _ fs.Object = (*Object)(nil)+ _ fs.Fs = (*Fs)(nil)+ _ fs.Purger = (*Fs)(nil)+ _ fs.Copier = (*Fs)(nil)+ _ fs.Mover = (*Fs)(nil)+ _ fs.DirMover = (*Fs)(nil)+ _ fs.Object = (*Object)(nil)+ _ fs.MimeTyper = (*Object)(nil))