Amazon S3PRO

This knowledge base article relates to the WS Form Amazon S3 add-on. Included with the Freelance & Agency editions or buy separately for the personal edition.

The Amazon S3 add-on allows you to configure file fields to upload to a connected Amazon S3 account. You can choose which path to upload the files to and can easily access the files from the submissions page.

The add-on creates a new file handler to WS Form called Amazon S3.

Installation

The Amazon S3 add-on is installed in the same way as installing the WS Form PRO plugin.

Once installed you will need to activate the license for the plugin. When you purchase the Amazon S3 add-on, you will be given a license key. If you have lost your license key(s), click here.

To activate your license key:

  1. Click WS Form in the WordPress administration menu.
  2. Click Settings.
  3. Click the Amazon S3 tab at the top of the page.
  4. Enter your license key.
  5. Click the Activate button.

If your license key fails to activate, please ensure you are using the correct license key and not your WS Form PRO license key.

Connecting to Amazon S3

In order to use the add-on, you need to connect it to Amazon S3.

First you will need to create IAM user credentials. To do this:

  1. Open the IAM console in your Amazon account.
  2. Click Users from the side menu.
  3. Click Create User.
  4. Enter a User Name.
  5. Ensure the user has read and write permissions for the S3 service. You may wish to create a new policy specifically for this purpose. Learn more.
  6. Edit the newly created user, then click the Security credentials tab.
  7. Under Access keys click Create access key.
  8. Choose Third-party service as the user case.
  9. Click Create access key.
  10. Copy the provided access key and secret key and store it somewhere securely.

Next you will need to enter the access key and secret key in WS Form settings

  1. Click WS Form in the WordPress administration menu.
  2. Click Settings.
  3. Click the Amazon S3 tab at the top of the page.
  4. Enter the access key and secret key.
  5. Click Save.

Alternatively you can add the keys to your wp-config.php file as follows:

define('WSF_AMAZON_S3_ACCESS_KEY', 'PASTE YOUR ACCESS KEY HERE');
define('WSF_AMAZON_S3_SECRET_KEY', 'PASTE YOUR SECRET KEY HERE');

How to Configure File Fields for Amazon S3

To configure a file field to push its uploads to Amazon S3:

  1. Click the settings icon on the file field.
    WS Form - Field Settings Icon
  2. In the basic tab change the File Handler setting to Amazon S3.WS Form - Amazon S3 - Select File Handler
  3. Choose the region of your bucket, e.g. us-west-2
  4. Enter the name of the bucket you wish to upload files to, e.g. ws-form. This must match the name of an existing bucket. Learn more.
  5. Optionally, change the upload path.

The upload path defaults to:

WS Form/#form_id/#submit_hash/#field_id/

You can use WS Form variables in this path to make it dynamic. The default value ensures each form, submission and field on the form is given its own folder in Amazon S3 to minimize the chance of files being overwritten. Bear in mind that each file field can be configured with the Multiple setting to be able to upload more than one file.

Some variables you might find helpful for this path are:

Variable Description
#form_id Returns the ID of the form.
#submit_hash A unique identifier for the submission.
#field_id The ID of the file field.

Accessing Amazon S3 Uploads

To access the files that are uploaded to Amazon S3, you can click on the file upload icons in submissions as you would any other file upload. The files are, of course, also accessible from within your Amazon S3 bucket.

WS Form - Amazon S3 Add-On - Submissions