If you store user-submitted files on Amazon S3, how do they get there? If your S3 upload process happens on your web server, then you're using bandwidth you don't have to.
Amazon S3 supports file uploading directly from the browser using CORS. As users add files to the file upload field they are uploaded directly to the Amazon S3 bucket and directory of your choice. When they submit the form, the Gravity Forms Entry will have the S3 URLs of the uploaded files.
- Same user interface as the default Gravity Forms file uploader
- Upload files directly to S3 to the bucket of your choice
- Option to force file renaming on upload ( to avoid s3 path conflict, or to prevent original file names from being stored in wordpress ).
- Option to enforce Server-Side encryption
- Option to set a path within the bucket
- Option to create a new directory for every form submission
- Integration with the Members plugin
- Option to use constants for S3 key and secret OR to set them in the dashboard.
How It Works
As the form is loaded a temporary write-only S3 signature is generated and the required headers are prepared for the upload widget.
As users drop files on the upload widget, or as they select files with the file select button, an upload request is created and sent to Amazon S3. The files are uploaded to S3 and the resulting S3 URL is stored in the file upload's hidden field.
When the rest of the form is submitted to your site, the S3 URLs are submitted like any other field.
- The page that the form is displayed on can't be cached, otherwise a unique S3 upload token won't be generated for each page view.
- If the Members plugin is enabled, any users (including admin!) will need to have gform_full_access or gform_s3_uploader capabilities.
- If your bucket permissions aren't set to public, then you'll need to sign the submitted S3 URLs in order to view the files.