🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 23, 2026

How to Let Visitors Attach Files From Google Drive and Dropbox in Gravity Forms

GravityExtra
How to Let Visitors Attach Files From Google Drive and Dropbox in Gravity Forms

Ask a visitor to attach a file to a form and you often get the same small sigh. The file lives in Google Drive or Dropbox. To attach it, the visitor must download it, wait, find it in a downloads folder, and upload it again. On a phone it is worse: the file is in a cloud app, the form is in a browser, and the two do not talk to each other. Many people give up, or send the wrong version. A file picker removes that detour.

What a cloud file picker does

Google and Dropbox both offer a small window that a website can open. The visitor signs in to their own account inside that window, sees their own files, and chooses one or more. The site receives either a link to the file or permission to read exactly that file. The visitor never downloads anything and never sees your server.

For the person filling in your form this is faster, and it is safer too: they choose a file from a place they already trust, and Google or Dropbox shows them what they are sharing before they confirm.

When it helps most

  • Job applications. A CV and a portfolio that already live in Drive.
  • Design and project briefs. Large decks, images and spreadsheets that are too big to email comfortably.
  • Insurance, legal and finance forms. Signed documents the customer keeps in their cloud storage.
  • Event and press forms. Photos, logos and slide decks from speakers and sponsors.
  • Support requests. A video or a log file that the customer already stored in Dropbox.

Link or copy: the first decision

There are two honest ways to use what the picker returns, and the right one depends on your job.

Keep the shared link

The entry stores the address of the file. It is quick, it costs your server nothing, and it needs no storage. The catch is that a link is only as open as the visitor made it. If the file is private to them, your team will see a link that asks for access. You can handle this by telling visitors to share with your team address, or by using the second option.

Keep a copy on your own site

Your server downloads the file when the form is submitted and stores it with the other form uploads. Now the file is yours: it does not vanish if the visitor deletes it or changes their sharing, and you can attach it to emails, back it up and delete it when your retention rule says so. The price is storage and care. A server that downloads files from the internet on behalf of a visitor must be strict, and this is where many do-it-yourself attempts go wrong.

What a safe server-side download looks like

Think about what could go wrong when a form can make your server fetch an address. A careless build could be tricked into fetching an internal address, a huge file that fills the disk, or a web page disguised as a picture. A careful build does the following:

  • It decides the address itself. For Google Drive, the server builds the address from the file ID and talks only to the Google Drive interface. For Dropbox, it accepts only the dropbox.com and dropboxusercontent.com families of hosts.
  • It checks every redirect. A first address that is allowed can still redirect somewhere else. Each hop is checked again, and a redirect to another host is refused.
  • It does not trust the size the browser reports. It reads the size from the service, and it stops the download at your limit even if the service reports nothing.
  • It looks at the real content. The extension must be on your list, and the content must match the extension. A page of script renamed to a picture is refused.
  • It cleans the name. No folders, no hidden second extension, no odd characters.
  • It leaves nothing behind. If any file fails, the visitor gets a clear message, nothing is stored, and the temporary files are deleted.

Your keys, not ours

Both services ask a website to identify itself before it can open the picker. With Google that means an API key, an OAuth client ID and a project number from a Google Cloud project. With Dropbox it is an app key from the Dropbox App Console. A responsible add-on lets you use your own keys, so that the sign-in screen carries your name, the usage is under your account, and no third party sits in the middle of your visitors’ files.

These values are not passwords. They appear in the page, because the picker needs them there, and you protect them by restricting them in the consoles: the API key to your site address, the OAuth client to your site origin, and Dropbox to your chooser domain.

The question of approval

Before you build on a picker, ask whether your use of it will need someone to approve your app. This is the part that surprises people later.

  • Google Drive. The picker works with a single permission called drive.file, which only reaches the files the visitor picks. Google classes it as non-sensitive, so it avoids the extra review that sensitive and restricted permissions need. You do set up your own consent screen and publish it, and Google may ask for basic brand verification if you want your logo shown.
  • Dropbox. The chooser needs only an app key and a list of allowed domains, and Dropbox says it does not require production approval.
  • Microsoft OneDrive. The newest OneDrive picker needs an app that people from any organization can approve. Microsoft blocks that for new multi-tenant apps whose publisher has not been verified through its partner program. That is a process outside your website, so the add-on described here leaves OneDrive out rather than promising something it cannot deliver.

Setting it up in Gravity Forms

With the Gravity Forms Cloud File Picker Premium Add-on, the work is mostly in the consoles, and you do it once.

  1. Create your Google Cloud project, turn on the Picker and Drive interfaces, and create an API key and a web OAuth client with your site as the allowed origin.
  2. Create a Dropbox app and add your site under chooser domains.
  3. Paste the keys into the add-on settings in Forms, Settings.
  4. In the form editor add the Cloud File Picker field, choose the services, link or copy, the accepted types, the largest size and the number of files.
The Cloud File Picker settings in the Gravity Forms form editor: services, what is stored, accepted file types, largest file and most files
The field settings in the form editor.

The field then shows two buttons. A visitor presses one, the picker of the service opens, and the chosen files appear in a short list with a button to remove each one. The browser already refuses files that are the wrong type or too large, and says why, and the server checks everything again on submit because a browser can always be changed by someone with bad intentions.

A Gravity Forms project brief with a Cloud File Picker field: buttons to choose from Google Drive and Dropbox, and two chosen files listed with a Remove button
The field on a form after two files were chosen.

Good habits for your form

  • Say what you accept. The field prints the limits under the buttons, so visitors know before they choose.
  • Keep the list of types short. Ask for PDF and images, not everything.
  • Write a sentence that tells visitors how the file will be used and for how long you keep it. People hand over files more readily when they know.
  • For sensitive documents use the copy option, set a retention rule, and delete entries when the job is done. The add-on removes the stored copies together with the entry.
  • Test on a phone. Pickers behave differently inside mobile browsers, and the buttons should be easy to press with a thumb.

Privacy in plain words

Nothing from Google or Dropbox is loaded when your page opens. Their scripts are fetched only when a visitor presses a button, so a visitor who never uses the field is never sent to those companies by your form. In link mode, your server never contacts either service. In copy mode, the visitor’s temporary Google access token is used for that single submission and is never stored in the entry, a log or the database.

A worked example: a design agency brief

A small agency wants prospects to send brand guidelines, a logo and a few reference images with their project brief. Most prospects keep these in Drive or Dropbox. The agency adds the field to the brief form, accepts pdf, png, jpg and zip, sets the largest file to 25 MB and the most files to five, and chooses the copy option because the team must be able to open every file without asking for access.

A prospect opens the form on their phone, presses Choose from Google Drive, picks the guidelines and the logo, and then presses Choose from Dropbox and picks a zip of references. They press submit. The server downloads the three files, checks their size and content, stores them with the entry and shows the team three links on the entry screen. Nobody downloaded or uploaded anything by hand.

Frequently asked questions

Do my visitors need an account?

They need a Google or Dropbox account to choose from that service, because the files are theirs. Visitors without one can still use the other service or fill in the form without attaching a file, unless you make the field required.

Can I use it together with the normal file upload field?

Yes. Many forms offer both: the usual field for files on the device and this field for files in the cloud.

Will it work on multi-page forms?

Yes. The list of chosen files is kept when the visitor moves between pages.

Does it add scripts to every page?

No. The add-on only loads its small script on pages that show a form with the field, and the services’ own scripts load only when a button is pressed.

Get started

If your visitors keep their files in the cloud, meet them there. See what the add-on does, what it costs and how to install it:

See the Cloud File Picker add-on

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr