Credit to Donovan Schönknecht for his Amazon S3 PHP class.
- On line 12, replace
access-key-herewith the Access Key provided to you when you registered for your S3 account.
- On line 13, replace
secret-key-herewith the Secret Key provided to you when you registered.
- On line 14, replace
bucket-namewith the name of the bucket you wish to upload the files to.
- On line 17, replace
1with the ID of the form that will be sending files to S3.
- On line 18, replace
18with the ID of the File Upload field.
Also, note that this does not prevent the uploaded files from being stored on your server. If you wish for the files to not be stored locally, I’m not aware of anything within Gravity Forms that makes it possible so you’ll need to use the PHP unlink() function.
For a neat tutorial on renaming Gravity Forms file uploads, check out this article from David at GravityWiz.com. You can use his code with the code from this tutorial to rename the files prior to sending them to S3 so to maintain a specific naming scheme and prevent overwrites.