google-apps-script-web-application

Moving google apps script to v8 file upload stopped working from sidebar

浪子不回头ぞ 提交于 2020-05-20 10:53:30
问题 I have a script running that works as intended. But moving the script to v8 makes the script not working. And I can't find a solution. I've cleaned up the script and tested it in the old engine and still works, but in v8 still doesn't working. It's a sidebar in a spreadsheet where to upload a single file to my google drive. Here the basic in the Html file <body> <h1>File Uploader</h1> <form> <input type="file" name="myFile" id="file"> <br> <input class="blue" type="button" id="submitBtn"

Moving google apps script to v8 file upload stopped working from sidebar

﹥>﹥吖頭↗ 提交于 2020-05-20 10:53:10
问题 I have a script running that works as intended. But moving the script to v8 makes the script not working. And I can't find a solution. I've cleaned up the script and tested it in the old engine and still works, but in v8 still doesn't working. It's a sidebar in a spreadsheet where to upload a single file to my google drive. Here the basic in the Html file <body> <h1>File Uploader</h1> <form> <input type="file" name="myFile" id="file"> <br> <input class="blue" type="button" id="submitBtn"

Moving google apps script to v8 file upload stopped working from sidebar

安稳与你 提交于 2020-05-20 10:53:07
问题 I have a script running that works as intended. But moving the script to v8 makes the script not working. And I can't find a solution. I've cleaned up the script and tested it in the old engine and still works, but in v8 still doesn't working. It's a sidebar in a spreadsheet where to upload a single file to my google drive. Here the basic in the Html file <body> <h1>File Uploader</h1> <form> <input type="file" name="myFile" id="file"> <br> <input class="blue" type="button" id="submitBtn"

CORS block: WebApp POST to Sheet

99封情书 提交于 2020-05-17 06:25:08
问题 I am getting an error due to CORS policy. It seems a common issue. I have read other questions and tried some of their solutions, but it still does not work. My app does the following: 1- GET a list of values from a google sheet and show them in a drop down list in a web app (still using script.google.com) 2- POST the value that the user select in the drop down list from the web app to the sheet. 1 (GET) was working fine with no issues. When I added 2 (POST), it gave me the CORS error for the

How to reload a Google Apps Script web app with a link?

梦想的初衷 提交于 2020-05-17 05:53:16
问题 Some time ago I put together some lines to generate random colors, all of them under #777777. → https://script.google.com/macros/s/AKfycbyXRyJzSUo5wJxhuHliGpL-GPuhKPvZ3mBKtSDZKd4qyxbvIsk/exec This is the code: Code.js function doGet() { return HtmlService.createHtmlOutputFromFile('Index'); } Index.html <!DOCTYPE html> <html> <head> <style> body{ font-family:CourierNew; text-align:center; } </style> </head> <body onload="myFunction()"> <div id="color"></div> <script> function myFunction() {

Throw custom timeout exception

江枫思渺然 提交于 2020-04-30 11:44:25
问题 I have a Google Apps Script web app ("Web App") that executes as the user, then calls individual functions from another Apps Script project ("API Executable") via the Apps Script API using UrlFetchApp.fetch() and executes them as me (see Get user info when someone runs Google Apps Script web app as me). A limitation of this method is that UrlFetchApp.fetch() has a 60s timeout, and one of my functions often takes longer than this. The API Executable function finishes running successfully, but

Throw custom timeout exception

只谈情不闲聊 提交于 2020-04-30 11:44:00
问题 I have a Google Apps Script web app ("Web App") that executes as the user, then calls individual functions from another Apps Script project ("API Executable") via the Apps Script API using UrlFetchApp.fetch() and executes them as me (see Get user info when someone runs Google Apps Script web app as me). A limitation of this method is that UrlFetchApp.fetch() has a 60s timeout, and one of my functions often takes longer than this. The API Executable function finishes running successfully, but

google.script.run stopped working in my web application

时间秒杀一切 提交于 2020-04-16 05:49:08
问题 my google web app has been running since months without issues. Today I suddenly get the error "Uncaught (in promise) TypeError: Cannot read property 'run' of undefined". Nothing was changed in the code 回答1: The answer has been found in the meanwhile. Apparently, on some PC's it was working, on others it wasn't. After clearing the browsing history (and cookies) on the PC, all was working again. 来源: https://stackoverflow.com/questions/60944335/google-script-run-stopped-working-in-my-web

google.script.run stopped working in my web application

半腔热情 提交于 2020-04-16 05:48:49
问题 my google web app has been running since months without issues. Today I suddenly get the error "Uncaught (in promise) TypeError: Cannot read property 'run' of undefined". Nothing was changed in the code 回答1: The answer has been found in the meanwhile. Apparently, on some PC's it was working, on others it wasn't. After clearing the browsing history (and cookies) on the PC, all was working again. 来源: https://stackoverflow.com/questions/60944335/google-script-run-stopped-working-in-my-web

Response and Error handling in Google Apps Scripts. doPost? withFailureHandler()?

风流意气都作罢 提交于 2020-04-15 15:43:43
问题 I hope everyone is safe and healthy given the current situation. I have a question in regards to a project with google apps script. I have a web app and I have been able to figure out routing with doGet() using links etc. //global variables const sheetId = "foo"; const Route = {}; Route.path = function(route, callback){ Route[route] = callback; } function doGet(e){ Route.path("newAccountForm",loadNewForm); Route.path("updateBrandForm", loadUpdateForm); if(Route[e.parameters.v]) { return Route