A simple setup for file upload using the file upload in Google Forms.
- See Using Clasp to login, create or clone a project
- Push code to project
clasp push
- For first time only, go to Script Editor to open your project and run
createFormSubmitTrigger
fromcreateFormSubmitTrigger.js
- Go to the form to create the file upload item to the form. (still unable to add programatically)
- If needed, create other form content by running
setupForm
fromsetupForm.js
in the Script Editor - If needed, create a spreadsheet to hold the form responses.
Note: If encounter "do not have permission" issue, run main
from the Script Editor to review and approve the authorization.
Login the user
clasp login --no-localhost
Create a new Project
clasp create --title "File-Upload" --type forms --rootDir ./src
Clone and work on an existing project
clasp clone "*******" --rootDir ./src
Watch and push code when saved
clasp push --watch
Edit (if need to)
- .clasp.json
"rootDir": "./src"
- appsscript.json
"timeZone": "Asia/Singapore"
Open in the script editor
clasp open
Preamble
- Install Docker Desktop if not installed
- Install the Remote Development extension pack in VS Code
- Run Docker Desktop
- Open repo folder with VS Code using Run Remote-Containers: Open Folder in Container...
Container composition
- using this Dockerfile
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:12
Container conposition
FROM gitpod/workspace-full
DockerfileFROM buildpack-deps:focal
Dockerfile- Ubuntu Focal based