Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
S3 upload form for direct S3 file uploading
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
generators/s3_upload_form
lib
test
.document
.gitignore
LICENSE
README.markdown
Rakefile
VERSION

README.markdown

s3_upload_form

Usage

<% form_tag s3_bucket_url, :multipart => true do -%> <%= s3_signature_tag :key => "uploads", :redirect => image_processing_url, :acl => "public-read", :max_filesize => 0..5.megabytes, :submit => submit_tag("Upload!") %> <%= label_tag :file, "File" %>
<%= file_field_tag :file %>
<%= submit_tag "Upload" %> <% end -%>

Remember to turn off the request forgery protection in the controller:

class UploadsController < ApplicationController self.allow_forgery_protection = false

def new
  # ...
end

end

Configuration

To configure s3_upload_form use s3_upload_form generator... ./script/generate s3_upload_form

... and edit the generated initializer file s3_upload_form.rb.

Jakub Kuźma, 2009

The gem is based on D2S3 plugin by Matthew Williams.

Something went wrong with that request. Please try again.