Amazon S3 Browser-Based Uploads

Here is an example of the browser-based uploads feature. The documentation describes the feature in more detail.

This example will walk you through the form generation, will show you an example form that you can try, and lastly give you the HTML to reproduce this form on your own web site.


Preliminaries

Before we get started, you need to:


Specifying Policy and Form Elements

Credentials

Please plunk in your credentials here. You can grab them by visiting here, hovering over “Your Web Services Account” and select “AWS Access Identifiers”.

Note: Your secret key is not actually transported over the wire; we are just using it for signing the document.

AWS ID
AWS Key

Set the Bucket

Uploaded content is uploaded into a bucket; the bucket is specified via the URL in the Form field’s action attribute. All current mechanisms of specifying a bucket are supported.

Note: Buckets cannot be created via POST; it is only intended for browser-based uploads.

Post URL:

Policy Document

The Policy Document describes the conditions under which the Signer allows an Anonymous user to impersonate them. Please refer to the documentation for what is permitted here.

After you are done editing, please click on the “Add Policy” button.

Form Fields

Please refer to the documentation for form fields we accept and how we interpret them.

Note: All form fields should be mentioned in the Policy document except for fields that are prefixed with x-ignore-.

Name: Value:

Sample Form Based on the Above Fields

Based on the data you've entered above, here's a list of all the form elements and a very basic (and not so pretty) UI:

File:


HTML Code for the Above