2017-10-20 177 views
0

如何允許所有/任何擴展文件通過網絡應用上傳到Google Drive選取器中?如何允許所有/任何擴展文件在Google Drive中上傳

我已經允許

mimeTypes: "image/png,image/jpeg,image/jpg,application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/msword,application/msword", 

我不能上傳金山文件(XLSX)

function initPicker() { 
    return { 
    locale: 'en', 
    token: ScriptApp.getOAuthToken(), 
    origin: "https://script.google.com", 
    parentFolder: "0B0Oj_1v-CAzNYmFMRkVUZjd0aHM", 
    developerKey: "AIzaSyBno-75vfzpW0hnBfagPrU1o5PxZ1yc8C8", 
    dialogDimensions: { 
     width: 600, 
     height: 425 
    }, 
    picker: { 
     viewMode: "LIST", 
     mineOnly: true, 
     mimeTypes: "image/png,image/jpeg,image/jpg,application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/msword,application/msword", 
     multiselectEnabled: true, 
     allowFolderSelect: true, 
     navhidden: true, 
     hideTitle: true, 
     includeFolders: true, 
    } 
    }; 
} 
+0

您是否嘗試過不設置它? –

+0

差不多,是的,我可以上傳微軟辦公文件 – KiKu

+0

所以......這能解決你的問題嗎? –

回答

1

你只需要刪除mimeTypes屬性,然後你就可以上傳的文件任何類型。

picker: { 
     viewMode: "LIST", 
     mineOnly: true, 
     multiselectEnabled: true, 
     allowFolderSelect: true, 
     navhidden: true, 
     hideTitle: true, 
     includeFolders: true, 
    } 
相關問題