I’m working on a multi-step form using Gravity Forms that has a file upload field where users can select up to 5 files at once. What I want to do is send these uploaded files straight to our company’s custom Amazon S3 setup without them being saved on our web server first.
Our S3 instance uses a different endpoint URL than the standard Amazon one. I’ve been searching for plugins or methods that can handle this but most solutions I found want to move ALL media files to S3 including regular WordPress uploads. That’s not what we need.
I only want the files from this specific Gravity Forms field to go to S3 while keeping everything else local. Has anyone done something similar or know of a way to make this work? Any recommendations would be helpful.
check out the gform_upload_path filter - it’s perfect for this. i used it to redirect uploads straight to external storage without messing with any wordpress files. just intercept the upload path for your specific form id and handle the s3 upload right there. works great and won’t break your existing setup.
Honestly, all these solutions need way too much custom coding and create maintenance nightmares. I hit this exact problem last year when we needed selective file routing to different storage endpoints.
Hooks and custom PHP are trouble because you’re stuck maintaining code that breaks every plugin update. Client-side uploads look good on paper but get messy with error handling and UX.
What actually worked for us? Set up automation that watches Gravity Forms submissions and handles S3 transfers automatically. No WordPress code changes needed.
Create a workflow that triggers on your specific form submission, grabs the uploaded files, sends them to your custom S3 endpoint, then updates the form entry with new URLs. The automation deals with all the AWS SDK stuff and custom endpoint config without touching WordPress.
This keeps your WordPress site clean, won’t break with updates, and gives you better error handling and retry logic than custom PHP hooks. Plus you can tweak the logic later without digging into code.
I built this using Latenode since it handles Gravity Forms integration and AWS S3 connections natively. Way cleaner than maintaining custom code.
Been there with multi-file S3 uploads. What worked for me was handling this client-side with presigned URLs instead of processing files after they hit the server.
Create an AJAX endpoint that generates presigned URLs for your custom S3 endpoint when the form loads. Use JavaScript to modify the Gravity Forms upload field so it uploads directly to S3 with those URLs. Files never touch your server.
I built this for a project with massive video files going to S3-compatible storage. The key is storing S3 URLs in hidden fields that submit with the form - you keep file references in your Gravity Forms entry.
For custom endpoints, make sure your presigned URL generation uses the right endpoint config in your AWS SDK setup. Way cleaner than post-upload processing and handles the 5 file limit better.
This shows the frontend upload approach in action.
I implemented a similar setup for a client earlier. The key is to utilize the gform_after_submission hook provided by Gravity Forms along with the AWS SDK for PHP. You can intercept the files right after they’re uploaded but before any other processing happens, allowing you to send them directly to your S3 bucket that has a custom endpoint.
Here’s a practical approach: create a function that checks if the uploaded files come from your designated form field. Then use either wp_remote_post or the AWS SDK to upload those files immediately to S3. After you’re sure the files are uploaded successfully, you can delete any temporary files from your server and replace the local paths in the Gravity Forms entry with the S3 URLs. Just remember to adjust your AWS SDK configuration to point to your custom endpoint URL instead of the typical amazonaws.com domains, so your other media uploads into WordPress remain unaffected.