Reputation: 126
I'm trying to create a google app script function where I want to fetch the URL of the image/video uploaded in the google form so that I can use it to display in my google web app. I'm not able to find any solution.
In the image below, the page source shows the URL of the image that was uploaded in the form. This URL is what I want from the app script.
Upvotes: 1
Views: 2000
Reputation: 96
When a file is uploaded via a Google Form, the file is placed in a folder within the form owner's Google Drive.
If you are the form owner, a new folder will be created within your drive and you will be able to access them using the Google Drive API.
Check out the documentation here: https://developers.google.com/drive/api/v3/search-files
If you know the name of the form, you can search the Folder within your drive and then use the API list the files within that folder using files.list .
You can find the fields within Files here: https://developers.google.com/drive/api/v3/reference/files and can use these fields to any specific URLs.
Upvotes: 1