【发布时间】:2015-09-25 08:10:27
【问题描述】:
我正在使用 Google Apps 脚本将文件上传到我的 Google 云端硬盘中的文件夹。是否有可能在应用程序脚本中直接链接到我刚刚上传的文件?目前,我只能获得保存所有文件的文件夹的链接。
我用来上传文件的代码:
function processForm(theForm) {
try{
var fileBlob1 = theForm.resumeFile;
var fileBlob2 = theForm.piFile;
var fldrSssn = DriveApp.getFolderById('My Folder ID');
fldrSssn.createFile(fileBlob1);
fldrSssn.createFile(fileBlob2);
return fldrSssn.getUrl();
}catch(e) {
Logger.log(e);
}//End catch
}
【问题讨论】:
标签: javascript file-upload google-apps-script