The Idea: This client needed to receive very large file submissions from their users directly into an S3 bucket. It was also important that this functionality be added to their existing Gravity Forms data collection process. A 2-stage form was not an option—both steps needed to happen via a single form submission.
When the user submits the form, their data is first validated through Gravity Forms' native process. The form submission process is then hooked into and paused while the large files are uploaded to S3 via the Amazon's JS SDK. At the time of upload, a UUID is generated and used as the folder name in the target bucket. This UUID is also added to the Gravity Form as a hidden form field so that the client can later associate the uploaded files with the submitted form data.
Once the files are successfully uploaded to S3, the Gravity Form native submission process resumes and the user gets a final success message generated by the Gravity Forms notification settings.
[su_button url="https://obmfg.com/file-uploads/" target="blank" style="flat" background="#d96077" color="#ffffff" size="6" radius="0" icon="icon: arrow-circle-o-right" icon_color="#ffffff"]Upload a giant file[/su_button]