added special folder mime types to google drive

This commit is contained in:
antelle 2017-12-09 10:58:11 +01:00
parent 349320c80d
commit 0f3807d6ad
1 changed files with 5 additions and 1 deletions

View File

@ -14,6 +14,10 @@ const StorageGDrive = StorageBase.extend({
_baseUrl: 'https://www.googleapis.com/drive/v3',
_baseUrlUpload: 'https://www.googleapis.com/upload/drive/v3',
_folderMimeTypes: [
'application/vnd.google-apps.folder',
'application/vnd.google-apps.site'
],
getPathForName: function(fileName) {
return NewFileIdPrefix + fileName;
@ -152,7 +156,7 @@ const StorageGDrive = StorageBase.extend({
name: f.name,
path: f.id,
rev: f.headRevisionId,
dir: f.mimeType === 'application/vnd.google-apps.folder'
dir: this._folderMimeTypes.indexOf(f.mimeType) >= 0
}));
if (!dir) {
fileList.unshift({