This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.document | Tue Jun 16 04:00:59 -0700 2009 | |
| |
.gitignore | Tue Oct 20 00:53:13 -0700 2009 | |
| |
LICENSE | Tue Jun 16 04:00:59 -0700 2009 | |
| |
README.markdown | Mon Aug 03 04:51:35 -0700 2009 | |
| |
Rakefile | Tue Jun 16 13:42:12 -0700 2009 | |
| |
VERSION | Mon Aug 03 04:51:35 -0700 2009 | |
| |
generators/ | Tue Jun 16 13:42:58 -0700 2009 | |
| |
lib/ | Mon Aug 03 04:51:35 -0700 2009 | |
| |
test/ | Wed Jun 17 02:47:27 -0700 2009 |
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" %>
<br/>
<%= file_field_tag :file %>
<br/>
<%= 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.







