🎉 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 Send Gravity Forms Uploads to Media Library Folders

GravityExtra
How to Send Gravity Forms Uploads to Media Library Folders

A Media Library with three thousand files in one long list is a place nobody wants to work in. Client documents, product photos, event pictures and uploaded forms all end up side by side, named like IMG_4032 or scan (3), with nothing to tell you where they belong. Folder plugins such as FileBird and Real Media Library fix this for files that you upload yourself. They do not know anything about the files that visitors send through your forms. This guide shows how to make Gravity Forms file uploads land in the right Media Library folder by themselves, by form, by upload field, by what the visitor typed, or one folder for every entry.

Why uploads from forms end up in the wrong place

Gravity Forms saves an uploaded file in its own folder inside the WordPress uploads directory, in a subfolder for the form and the month, and it keeps only the address of the file in the entry. The file is not a Media Library item, so it does not show in the library at all, and a folder plugin has nothing to sort. You can see the files in the entry or download them one by one, but you cannot use them in a page, attach them to a post or hand them to a colleague who lives in the Media Library.

The usual workaround is to import the file by hand, give it a name and drag it to a folder. That is fine for one file a month. It is a daily chore when a form collects job applications, client documents, damage photos or competition entries, and it is easy to put a file in the wrong folder or to forget it.

What you will build

  • A form with File Upload fields, a name and a short text field for the department or the project.
  • A rule that copies every uploaded file into the Media Library, with a clean title, an alt text and a caption from the form.
  • A rule that puts the file in a folder: one folder for the whole form, one folder for each upload field, a folder named from the answers, or one folder for each entry.
  • A confirmation that tells the visitor where the file went, using merge tags.

Step 1: install the plugins

You need Gravity Forms, one of the two free folder plugins from WordPress.org, FileBird or Real Media Library Lite, and the Gravity Forms Media Library Folders Premium Add-on. Activate them in that order, then open Forms → Settings → Media Folders and enter your license key. If you forget the folder plugin, the add-on shows a notice and does nothing.

Make a folder or two in your folder plugin if you want to use the simplest rule. For the template rule the add-on makes the folders itself.

Step 2: build the form

Create a form with a Single Line Text field called Your name, a File Upload field called Your photo, a Single Line Text field called Department and, if you need it, a second File Upload field called Your document. Allow only the file types you really want, and set a file size limit on every upload field. Visitors who must send several files can use the multiple file uploader.

A Gravity Forms project intake form with the fields Your name, Your photo, Department and Your document, filled in with a photo and a PDF ready to send
An ordinary Gravity Forms form: the visitor sees nothing about folders.

Step 3: add the feed

Open the form, then Settings → Media Folders → Add New. Name the feed and keep the upload fields ticked. Under Which folder keep A folder chosen here and pick a folder from the list. The list shows the folders of both folder plugins with their full path, so a folder inside a folder is easy to tell apart. Save the feed and send the form once. Open the Media Library: the file is in the folder, with the title and the alt text you set.

The Media Folders feed settings: the File Upload fields, the folder choice with one folder per upload field, the folder per entry option and the file details with merge tag buttons
The feed settings: which folder, a folder per upload field, a folder per entry and the file details.

Step 4: one folder for each upload field

If the form has two upload fields, the feed shows a box for each of them. Send photos to one folder and documents to another. A field without its own folder falls back to the folder chosen at the top. This is the quickest way to keep a mixed form tidy: a client portal with a photo field and a contract field, an application with a portfolio and a CV, a damage report with pictures and an invoice.

Step 5: let the answers choose the folder

Often the folder depends on the answer to a question: the department, the city, the project. Switch the folder rule to A folder named by a template and type Clients/{Department:3}. The first entry for Sales makes the folder Clients and the folder Sales inside it. The second entry for Sales finds them and reuses them. An entry for Support makes only the new folder Support. You can use up to three levels, and the usual tags {entry_id}, {form_title}, {user_login} and {date} work as well.

If the word comes from a text field, think about who can type it. A visitor who types a new word makes a new folder. If that is not what you want, switch off Make a folder that does not exist yet. The add-on then uses the folder only if it exists and otherwise keeps the file in the Media Library without a folder, with a note on the entry. Folder names are cleaned before they are used: tags are removed, slashes make levels, dots are dropped and long names are cut.

FileBird has real sub folders. Real Media Library Lite does not have them, so the add-on joins the levels into one name, such as Clients – Sales. The folder is made and reused in the same way.

Step 6: one folder for every entry

When the files of one person must stay together, tick Also make one sub folder for each entry. Every entry gets a folder of its own inside the folder you chose or the folder the template made. The default name is Entry followed by the entry number; you can add the name of the sender with a merge tag. A job application with a CV, a cover letter and a portfolio lands in one folder that you can zip, share or delete in one go.

Step 7: title, alt text and caption

Files named scan (3) help nobody. In File details use the merge tag button at the right of each box. A title such as {Your name:1} – {filename} gives every file the name of its sender. The alt text can come from a field where the visitor describes the picture, which helps people who use a screen reader and helps search engines. The extra tokens {filename}, {index} and {entry_id} work in all three boxes; with several files in one entry, {index} numbers them 1, 2, 3.

Step 8: check the entry

Open an entry in Forms → Entries. A box called Media Library folder shows the folder path, the folder plugin and every file as a thumbnail. The entry notes say how many files were put in which folder, how many new folders were made and what was skipped. If something went wrong, for example a folder that was deleted after the feed was saved, the file is still in the Media Library and the note says what happened. Nothing is lost.

The Media Library folder box on a Gravity Forms entry screen: the folder path, the folder plugin and the thumbnails of the files that were copied
The entry screen shows the folder each file went to and the files themselves.

Merge tags for confirmations and e-mails

The add-on gives you the tags {media_folder_name}, {media_folder_path}, {media_folder_id} and {media_file_count}. A confirmation can say that two files were saved in the folder Clients – Sales. A notification to your team can carry the folder in the subject line, so a message such as New files in {media_folder_name} tells the right person at once where to look.

Things worth knowing before you launch

  • Each file exists twice on the server: the copy that Gravity Forms keeps for the entry and the copy in the Media Library, plus the thumbnail sizes WordPress makes for pictures. Plan your disk space and set a file size limit on every upload field.
  • A file in the Media Library has a public address. Keep confidential documents out of forms that copy to the library, or use a different rule for them.
  • Files with a script extension are never copied, even if the upload field would accept them.
  • FileBird works with a shared folder tree and, optionally, with one tree per user. The add-on uses the shared tree.
  • Deleting an entry does not delete the files or the folders. That is on purpose: the library may already use the files in a page.

Which folder plugin should you use?

Both free plugins give you a clean folder tree in the Media Library. FileBird has real sub folders in the free version, which makes the template rule and the folder for each entry tidier. Real Media Library Lite keeps its folders flat, and the add-on works around that by joining the levels into one name. If you already use one of them, keep it; the add-on works with both, and you can even use them side by side while you decide.

Frequently asked questions

Can visitors send several files in one go?

Yes. Use the multiple file uploader of the File Upload field. The feed copies each file and sets a limit per entry, from 1 to 50.

Do visitors need an account?

No. Anyone who can see the form can send files. Folders are made by the add-on on the server, not by the visitor.

What about pictures and documents in the same form?

Both work. Pictures get their thumbnails; documents are copied as they are. Use one folder for each upload field if you want to keep them apart.

Is any data sent to another service?

No. Everything happens on your own server between Gravity Forms, WordPress and the folder plugin.

Does it move files that are already in the Media Library?

No. It only handles the files of the entries it processes.

Get started

The Gravity Forms Media Library Folders Premium Add-on turns every Gravity Forms upload into a tidy Media Library item in the folder you want, with the checks a public form needs. See the features, the price and the setup guide on the add-on page.

See the Media Library Folders 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