2016-11-30 90 views
3

我使用REST API「https://www.googleapis.com/drive/v3/files/fileId/export」「reference page」讓谷歌文檔谷歌驅動器REST API文件出口限制

我有文件大小約5 MB,當我嘗試獲取文件我有json的錯誤:

{ 
    "error": { 
    "errors": [ 
     { 
     "domain": "global", 
     "reason": "exportSizeLimitExceeded", 
     "message": "This file is too large to be exported." 
     } 
    ], 
    "code": 403, 
    "message": "This file is too large to be exported." 
    } 
} 

有什麼辦法解決這個錯誤?

+0

嗯Google文檔沒有文件限制,因此您的文件ID是否正確,並且您是否嘗試導出Google文檔,表格或幻燈片? –

+0

是的,對於doc文件<5 MB它可以工作,但文件中的問題> 5 MB。 – Abd

回答

1

正如錯誤消息中所述,API可以導出的文件有多大的限制。確實沒有什麼可以解決的,你必須用小文件來做。

{ 
"error": { 
"errors": [ 
{ 
"domain": "global", 
"reason": "exportSizeLimitExceeded", 
"message": "This file is too large to be exported." 
} 
], 
"code": 403, 
"message": "This file is too large to be exported." 
} 
} 
+1

@Dalm To,謝謝你的回答,我發現這個解決方案是「https://www.labnol.org/internet/direct-links-for-google-drive/28356/」,沒有導出限制。 – Abd

+0

好極了。我已經與Google聯繫,請提供文件限制,以避免其他人遇到此問題。 – DaImTo

+0

報告問題https://issuetracker.google.com/issues/38156498 – DaImTo