How to Receive Files in your Google Drive from Anyone

Published in: Google Drive - Google Forms

A school teacher wants to have a public drop box (not Dropbox) where students can upload homework assignments. A designer may need a public drop box where clients can upload photographs easily. A recruiter wants to have an online form where job applicants can upload their resumes.

Google Forms would have been a perfect solution here but unfortunately you cannot upload files to Google Forms.

The other option is to have a shared folder inside Google Drive where others may upload files but this approach does have limitations. One, only people with a Google account would be able to upload files in a shared folder. Second, all collaborators can view and even remove files that have been uploaded in a shared folder on Google Drive.

Drive Form with File Uploads

Receive Files in Google Drive with Forms

What you can do is create a regular web form (written in HTML and CSS) and then use Google Scripts to upload the content of this form into a folder in your Google Drive.

Before diving into the implementation, take a look at this sample form. When you submit the form, it will create a new folder, corresponding to your name, in my Google Drive and upload the file in that folder This is a public form and you don’t even need to have a Google Account to upload files. The form also works on mobile devices.

  • Click here to make a copy of the Google Script into your Google Drive.
  • This is vanilla form with a few text fields and a file upload button. You can edit the forms.html file to apply your own CSS styles or add more input and textarea fields.
  • From the Run menu, choose doGet and authorize the script. The script needs these permissions since users will be uploading files to your Google Drive.
  • Next choose Deploy as Web App from the Publish menu, choose Anyone, even Anonymous under who has access and then click the Deploy button.

The Google Script will now offer you the link (URL) of your form. Anyone can now use this form to upload files to your Google Drive.

<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"
                        return false;">

The advanced version of the file upload form is even more capable.

It can save the form responses in a Google Spreadsheet along with the Drive URLs of the uploaded files. Form users can upload files of any size and you can get email notifications when people submit your form.

PS:If this looks a bit too technical, you can ask guests to send you files as email attachments and then use the Gmail to Google Drive program to automatically save these file attachments in your Drive.

[**] If you aren’t on Gmail or Google Apps, you can still receive files in Dropbox from anyone anonymously.

📮  Subscribe to our Email Newsletter for Google tips and tutorials!
Published in: Google Drive - Google Forms

Looking for something? Find here!

Meet the Author

Web Geek, Google Developer Expert
Amit Agarwal

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India. He is the developer of Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

Get in touch

Google Add-ons

Do more with your Gmail and GSuite account

We build bespoke solutions that use the capabilities and the features of Google Workspace for automating business processes and driving work productivity.

  1. Mail Merge with Attachments
    Send personalized email to your Google Contact with a Google Sheet and Gmail
  2. Save Emails and Attachments
    Download email messages and file attachments from Gmail to your Google Drive
  3. Google Forms Email Notifications
    Send email notifications to multiple people when a new Google Form is submitted
  4. Document Studio
    Create beautiful pixel perfect documents merging data from Google Sheets and Google Forms
  5. Creator Studio for Google Slides
    Turn your Google Slides presentations into animated GIFs and videos for uploading to YouTube