A school teacher needs a public drop box (not the Dropbox) where students can submit assignments for homework. A designer can need a public drop box, where customers can easily upload pictures. A recruiter wants an online form where applicants for jobs can upload their resumes.
Google Forms would have been a perfect solution here but you can’t upload files to Google Forms unfortunately.
The other choice is to have a shared folder inside Google Drive where other people can upload files but there are limitations to that approach. One, only those with a Google account could upload files to a shared folder. Second, all collaborators can access files uploaded to a shared folder on Google Drive, and even delete them.
Using Google Forms to Receive Files in Google Drive
What you can do is create a regular web form (written in HTML and CSS) and then use Google Scripts in your Google Drive to upload the content of this form to a folder.
Take a look at this sample form before plunging into implementation. When you submit the form, a new folder will be created in my Google Drive, corresponding to your name, and the file will be uploaded to that folder This is a public form and you don’t even need a Google Account to upload files. The form also functions on mobile devices.
- To copy the Google Script into your Usb Drive, click here.
- This is vanilla form with a few text fields and a button for uploading files. To apply your own CSS styles, you can edit the forms.html file or add more fields for input and textarea.
- From the Run menu, choose doGet and authorize the script. Because users can upload files to your Google Drive, the script requires certain permissions.
- Next, from the Publish menu, choose Deploy as Web App, choose Anyone, even Anonymous, under whom you have access and then click the Deploy button.
You will now be provided the Google Script connection (URL) of your form. Anyone can now upload files to your Google Drive using this form.
<form id="myForm"> <label>Your Name</label> <input type="text" name="myName"> <label>Pick a file</label> <input type="file" name="myFile"> <input type="submit" value="Upload File" onclick="google.script.run .uploadFiles(this.parentNode); return false;"> </form>
Even more capable is the advanced version of the upload form for files.
It can save the answers to the form in a Google Spreadsheet along with the uploaded file Drive URLs. Form users can upload files of any size, and when people submit your form, you can get notifications by email.
PS: If this looks a little too technical, you can ask guests to send you files as email attachments and then use the Gmail to Google Drive program to save these file attachments to your Drive automatically.
[* *] If you’re not on Gmail or Google Apps, you can still anonymously receive files from someone in Dropbox.