"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
drive: add support for apps-script to json export
Fabian Möller15b1a1f9096c
diff --git a/backend/drive/drive.go b/backend/drive/drive.goindex 70ec279b7..ec5e85a03 100644--- a/backend/drive/drive.go+++ b/backend/drive/drive.go@@ -110,6 +110,9 @@ var ("application/x-link-url": ".url","application/x-link-webloc": ".webloc",}+ _mimeTypeCustomTransform = map[string]string{+ "application/vnd.google-apps.script+json": "application/json",+ }partialFields = "id,name,size,md5Checksum,trashed,modifiedTime,createdTime,mimeType,parents,webViewLink"fetchFormatsOnce sync.Once // make sure we fetch the export/import formats only once_exportFormats map[string][]string // allowed export MIME type conversions@@ -1135,7 +1138,10 @@ func (f *Fs) findExportFormatByMimeType(itemMimeType string) (}for _, emt := range exportMimeTypes {if emt == _mimeType {- return _extension, _mimeType, true+ return _extension, emt, true+ }+ if _mimeType == _mimeTypeCustomTransform[emt] {+ return _extension, emt, true}}}diff --git a/docs/content/drive.md b/docs/content/drive.mdindex da3b0d08a..e707bf876 100644--- a/docs/content/drive.md+++ b/docs/content/drive.md@@ -481,6 +481,7 @@ represent the currently available converions.| epub | application/epub+zip | E-book format || html | text/html | An HTML Document || jpg | image/jpeg | A JPEG Image File |+| json | application/vnd.google-apps.script+json | JSON Text Format || odp | application/vnd.oasis.opendocument.presentation | Openoffice Presentation || ods | application/vnd.oasis.opendocument.spreadsheet | Openoffice Spreadsheet || ods | application/x-vnd.oasis.opendocument.spreadsheet | Openoffice Spreadsheet |