Gravity Forms is one of the most popular form plugins for WordPress. If you’re using it to collect file uploads from visitors or customers, Infinite Uploads can automatically offload those files to cloud storage. No extra configuration needed. Your uploaded files go straight to the cloud, just like everything else in your media library.
Think of it this way: without Infinite Uploads, every file someone submits through a Gravity Form lands on your web server and stays there. That eats into your hosting storage. With Infinite Uploads active, those files get moved to cloud storage automatically. Your server stays light, and the files are served from a CDN closer to your visitors.
How Gravity Forms File Uploads Work with Infinite Uploads
Once Infinite Uploads is installed and connected to your cloud storage, Gravity Forms file uploads are handled automatically. There’s nothing extra to toggle on. When a visitor submits a form with a file attached, that file goes through the normal WordPress upload process and Infinite Uploads picks it up from there.
Here’s what happens behind the scenes:
- A visitor fills out your Gravity Form and attaches a file.
- WordPress saves the file to your uploads directory, just like any other media upload.
- Infinite Uploads detects the new file and offloads it to your cloud storage (S3, DigitalOcean Spaces, Google Cloud, or whatever provider you’ve connected).
- The file URL updates to point to the cloud. The form entry still works. Downloads from the admin panel still work. Nothing breaks.
Setting Up Gravity Forms with Infinite Uploads
If you already have Infinite Uploads connected and working on your site, you’re mostly done. But there’s one thing you NEED to check: make sure the Gravity Forms upload folder isn’t excluded from offloading.
Check Your Folder Exclusions
Infinite Uploads has a feature that lets you exclude certain folders from being offloaded. This is useful for things like backup folders you don’t want eating up your cloud storage quota. But if the Gravity Forms upload path accidentally ends up on that exclusion list, your form uploads won’t make it to the cloud.
To check:
- Go to your WordPress dashboard.
- Click Infinite Uploads in the left sidebar.
- Go to the Settings tab.
- Look for the Folder Exclusions section.
- Make sure the Gravity Forms upload directory is NOT listed there. Gravity Forms typically stores uploads in your main WordPress uploads folder, so unless you’ve added a custom exclusion, it should be fine. If you see a path that includes “gravity_forms” in the exclusion list, remove it.
Configure File Types in Gravity Forms
Gravity Forms lets you control which file types visitors can upload. This is a Gravity Forms setting, not an Infinite Uploads setting. You configure it inside your form editor.
- Open your form in the Gravity Forms editor.
- Click on your File Upload field.
- Under Allowed file extensions, list the file types you want to accept (like jpg, png, pdf, docx).
- Set the Maximum File Size to whatever makes sense for your use case.
Whatever file types and sizes you allow in Gravity Forms, Infinite Uploads will offload them. It doesn’t filter or restrict anything on its end. If Gravity Forms accepts the file, Infinite Uploads moves it to the cloud.
Uploading Large Files Through Gravity Forms
Gravity Forms file uploads are limited by your server’s PHP settings. Most shared hosting plans cap uploads at 2MB to 8MB. If you need visitors to submit larger files (videos, design files, high-res photos), you’ll run into that ceiling fast.
That’s where Big File Uploads comes in. It’s a companion plugin to Infinite Uploads, and it breaks large files into smaller chunks during upload so they don’t hit server limits. Think of it like mailing a large package in several smaller boxes instead of trying to ship one massive crate. The pieces get reassembled on the other end, and Infinite Uploads offloads the final file to the cloud.
If your forms need to accept files larger than your server allows, Big File Uploads is the fix. You won’t have to mess with PHP settings or ask your hosting company to change anything.
Where Gravity Forms Files Go After Cloud Offloading
Once a file is offloaded to cloud storage, everything still works exactly the way you’d expect:
- Form entries in Gravity Forms still show the file. The link updates to point to your cloud storage URL, but clicking it still downloads the file.
- The WordPress Media Library tracks the file normally. You can find it, view it, and manage it from the Media page.
- Admin downloads work. You can download submitted files from the form entries screen without any issues.
- Notification emails that include file links will point to the cloud URL. Recipients can still download the file.
Securing Gravity Forms File Uploads in Cloud Storage
If your forms collect sensitive documents (contracts, tax forms, medical records), security matters. Here are a few things to set up:
- Restrict file types. Only accept the file formats you actually need. Don’t leave the upload field wide open.
- Use Gravity Forms’ conditional logic to show upload fields only to logged-in users or specific user roles.
- Enable form entry access controls. Gravity Forms lets you limit which admin users can view form submissions.
- Monitor your upload activity in the Infinite Uploads dashboard. If you see unexpected spikes in file uploads, that could be a sign of spam submissions or abuse.
- REMEMBER: Infinite Uploads is not HIPAA or encrypted.
Cloud storage through Infinite Uploads is inherently more secure than leaving files on a shared hosting server. Your cloud provider handles encryption, redundancy, and access controls at a level most WordPress hosts can’t match.
Developer Hooks for Gravity Forms File Uploads
If you’re building custom functionality around Gravity Forms file uploads, Infinite Uploads exposes several hooks and helper functions you can use in your code.
Excluding Gravity Forms Paths Programmatically
The infinite_uploads_sync_exclusions filter lets you control which upload paths get offloaded. If you need to EXCLUDE certain Gravity Forms upload directories from cloud sync (or make sure they’re included), use this filter.
// Exclude a specific Gravity Forms upload folder from offloading
add_filter( 'infinite_uploads_sync_exclusions', function( $exclusions ) {
$exclusions[] = 'wp-content/uploads/gravity_forms';
return $exclusions;
} );
By default, Infinite Uploads offloads everything in your uploads directory. You’d only use this filter if you have a specific reason to keep certain Gravity Forms files local. Most sites won’t need it.
Checking If a Gravity Forms File Was Offloaded
Use infinite_uploads_check_offloaded() to verify whether a specific file has been moved to cloud storage. This is useful if you’re building custom logic around form submissions and need to confirm a file made it to the cloud before triggering a notification or workflow.
// Check if a Gravity Forms uploaded file is in cloud storage
add_action( 'gform_after_submission', function( $entry, $form ) {
// Get the file upload field value (field ID 5 in this example)
$file_url = rgar( $entry, '5' );
$file_path = str_replace( site_url(), ABSPATH, $file_url );
if ( infinite_uploads_check_offloaded( $file_path ) ) {
// File is in cloud storage, safe to proceed
error_log( 'GF upload offloaded: ' . $file_url );
}
}, 10, 2 );
The function takes a file path and returns true if the file has been offloaded, false if it hasn’t. Pair it with Gravity Forms’ gform_after_submission hook to run your check right after a form is submitted.
Hooking Into the Sync Process
Infinite Uploads fires two action hooks around the sync process that you can use to run custom code before or after files are offloaded:
- infinite_uploads_before_sync fires right before Infinite Uploads starts moving files to the cloud. Use it for logging, pausing other processes, or running pre-sync validation.
- infinite_uploads_after_sync fires after sync completes. Good for triggering notifications, updating custom database records, or running cleanup tasks.
// Log when Gravity Forms files get synced to cloud
add_action( 'infinite_uploads_after_sync', function() {
error_log( 'Infinite Uploads sync completed at ' . current_time( 'mysql' ) );
} );
Deleting Cloud Files from Form Entries
When you delete a Gravity Forms entry, the uploaded files don’t automatically get removed from cloud storage. If you need to clean up cloud files when entries are deleted, use infinite_uploads_delete_files_from_cloud() hooked into Gravity Forms’ entry deletion action.
// Remove cloud files when a Gravity Forms entry is deleted
add_action( 'gform_delete_entry', function( $entry_id ) {
$entry = GFAPI::get_entry( $entry_id );
$form = GFAPI::get_form( $entry['form_id'] );
foreach ( $form['fields'] as $field ) {
if ( $field->type !== 'fileupload' ) continue;
$file_url = rgar( $entry, $field->id );
if ( empty( $file_url ) ) continue;
$file_path = str_replace( site_url(), '', $file_url );
infinite_uploads_delete_files_from_cloud( $file_path );
}
} );
Troubleshooting Gravity Forms Cloud Upload Issues
If your Gravity Forms uploads aren’t being offloaded to the cloud, check these things first:
Files Stay on Your Server After Upload
The most common cause is a folder exclusion. Go to Infinite Uploads > Settings > Folder Exclusions and make sure nothing related to Gravity Forms is listed. If you recently added exclusions for other reasons, double-check that they don’t accidentally catch the Gravity Forms upload path.
Uploads Fail or Time Out
Large files can hit PHP limits before Infinite Uploads even gets a chance to offload them. Check your server’s upload_max_filesize and post_max_size PHP settings. If you can’t change those, install Big File Uploads to handle chunked uploading.
File Links in Form Entries Are Broken
If file links in your Gravity Forms entries show 404 errors, the files might have been deleted from cloud storage or your CDN configuration changed. Check your Infinite Uploads dashboard to confirm the files are still there. If you recently changed your CDN URL or domain, the old links in existing form entries won’t update automatically. You’ll need to update those URLs in the Gravity Forms database or re-upload the files.
Still Stuck?
Contact Infinite Uploads support with a description of what’s happening. Include the Gravity Forms version you’re running, and whether you’re using any other plugins that modify the upload process. The more detail you give us, the faster we can get it sorted.