If you already own a copy of Gravity Forms and your needs are simple, you can use Gravity Forms plus one or two other free plugins to sell and securely deliver digital files, using Amazon S3.
Here’s what you’ll need:
- The files you want to deliver
- Gravity Forms
- A Gravity Forms payment add-on: Stripe, PayPal, Authorize.net, etc.
- An Amazon S3 account
- A method for uploading your files to Amazon S3
- A method for controlling access to the files
- Upload your files to an Amazon S3 bucket, keeping the default to private. You can either do this directly or use a plugin that will automatically send any media file you upload to WordPress to Amazon S3. Here are a few plugins I found from a quick search:
- Install the free Expiring Amazon S3 Links by Fat Panda WordPress plugin for controlling access to your files. Be sure to add your AWS Access Key ID and Secret Access Key to your wp-config.php file (replacing the stars below with your account information:
define( 'FPEAS3_AWS_S3_ACCESS_ID', '***************' );
define( 'FPEAS3_AWS_S3_SECRET', '***************' );
If you’re serving videos specifically, you might try these plugins:
- Create your Gravity Forms payment form
- In the Gravity Forms ‘Confirmation’ (or User Notification) for your form, enter the shortcode to link to your file:
[s3 bucket="your-S3-bucket" path="/path/to/file" expires="60"]Download![/s3]
It’s worth noting that the path to your file is relative to your bucket. So if your bucket name is ‘my-bucket’ and you’ve uploaded your file into a folder called ‘purchases’, the path will be ‘/purchases/file-name’. Also, the expires attribute is in minutes, with the default being 5 minutes and you would change it to 120 minutes if you wanted the link to be accessible for two hours.
Here’s an example of a form submission confirmation with a download link for a PDF file:
Here’s the delivered file:
And here is the result of someone trying to use a link after it expires:Enjoy! 🙂
Questions? Email Me