我的Google Apps脚本中有doGet
方法。我在网址中传入folderId
参数,然后我可以使用第一个参数在doGet
方法内以e.parameters.folderId
的方式访问它。
但是,我的Google Apps脚本会上传一个文件,我希望此参数可供upload
方法使用,我的页面在尝试上传文件时会调用该方法:
<button onclick="google.script.run.upload(this.parentNode);">ok</button>
我试图将它作为第二个参数传递给此方法,但后来我收到了这个错误:
Uncaught Error: Forms with file inputs must be the only parameter.
at ...
如何从folderId
方法中访问upload
值?
提前致谢。