javascript - 我如何将函数的 fileId 用于其他函数?
问题描述
我有这两个功能,但在 DriveFile 的 id 字段中,arquivoiD 不起作用,它总是返回错误Drive materials must have an ID。”
function uploadFiles(data) {
var arquivo = data.myFile;
var folder = DriveApp.getFolderById("");
var subirArquivo = folder.createFile(arquivo);
var arquivoId = subirArquivo.getId();
Logger.log(arquivoId)
return subirArquivo.getUrl();
}
function cadastrarAV (nomeAV,curso, arquivoId){//I don't see how you are passing this id in your google.script.run....
var atividade = {
title: nomeAV.tit ,
description: nomeAV.desc,
workType: "ASSIGNMENT",
materials: [ {
driveFile: {//this does not look right...Cooper
driveFile: { id : arquivoId,
title: "Av1"
},
shareMode: "VIEW"
}
解决方案
推荐阅读
- python - Python - 元组超出范围
- python-3.x - 在pyspark中使用窗口函数sql
- php - PHP SESSID 在每次页面加载时重置
- c - 类 UNIX 操作系统上二进制文件的最少内存使用量是多少?
- reactjs - 在不从父级传递的情况下访问子级引用
- odata - Sharepoint 2013 REST API GetFolderByServerRelativeUrl 不会返回作者详细信息
- python - 基于列值重复数据帧的行
- session - Java EE 的自定义状态管理
- python - pip install urllib3 挂在“由于 etag 缓存”
- c++ - 为什么radare2为非空main()返回一个空的导入列表?