0
当我尝试使用Google Apps脚本从URL下载图片时,出现以下错误。DriveApp.createFile导致服务器错误
We're sorry, a server error occurred. Please wait a bit and try again.
这是代码。
function TT() {
var response = UrlFetchApp.fetch('https://www.dropbox.com/s/g9jtm390l67uqkb/128.png?dl=1');
var blob = response.getBlob();
Logger.log(blob.getContentType());
var file = DriveApp.createFile(response);
}
这很奇怪,它给出了一个错误,并使文件。 – DavidVdd
确实,我今天试过了,我也得到了那个服务器错误,我想这不是关于代码的东西......你可以做的是把“var file = DriveApp.createFile(blob);”在现在的“尝试捕捉”声明中。 – LeandroP