Skip to content

Commit

Permalink
Added README example output.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwilliams committed Mar 10, 2009
1 parent b5e5136 commit d7f85ff
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.markdown
Expand Up @@ -10,7 +10,21 @@ d2s3 (direct to s3) is a simple helper that generates an upload form that will t
:redirect => image_processing_url,
:acl => 'public-read' %>

Most of the options are optional.
The above helper will generate the following similar HTML form, generating all of the appropriate field keys, policy, and signature based on your Amazon Web Services YAML configuration file.

<form action="https://YOUR_S3_BUCKET.s3.amazonaws.com/" method="post" enctype="multipart/form-data">
<input type="hidden" name="key" value="uploads/${filename}">
<input type="hidden" name="AWSAccessKeyId" value="YOUR_AWS_ACCESS_KEY">
<input type="hidden" name="acl" value="private">
<input type="hidden" name="success_action_redirect" value="/image_processing_url">
<input type="hidden" name="policy" value="YOUR_POLICY_DOCUMENT_BASE64_ENCODED">
<input type="hidden" name="signature" value="YOUR_CALCULATED_SIGNATURE">
<input type="hidden" name="Content-Type" value="image/jpeg">
File to upload to S3:
<input name="file" type="file">
<br>
<input type="submit" value="Upload File to S3">
</form>

_**Matthew Williams, 2009**_

Expand Down

0 comments on commit d7f85ff

Please sign in to comment.