directlytos3 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -34,6 +34,7 @@ A full list of options that can be passed to the helpers are listed below
34
34
  - acl: public-read|public|private
35
35
  - max_filesize: The maximum file size
36
36
  - randomize: Add a leading random string to avoid collisions
37
+ - path: If you need to proxy the request using ajax
37
38
 
38
39
  ## TODO
39
40
 
@@ -50,7 +50,8 @@ module Directlytos3
50
50
  raise ArgumentError, "s3_form_for: Missing block" unless block_given?
51
51
 
52
52
  options = args.extract_options!
53
- args << {:url => "https://#{options[:bucket]}.s3.amazonaws.com/", :builder => options[:builder], :enctype => "multipart/form-data", :method => "post", :html => {:id => 's3-upload-form'}, :authenticity_token => false, :remote => options[:remote]}
53
+ url = options[:path] || "https://#{options[:bucket]}.s3.amazonaws.com/"
54
+ args << {:url => url, :builder => options[:builder], :enctype => "multipart/form-data", :method => "post", :html => {:id => 's3-upload-form'}, :authenticity_token => false, :remote => options[:remote]}
54
55
  Directlytos3::configure(options)
55
56
  form_for(record, *(args)) do |f|
56
57
  s3_hidden_fields(options)
@@ -1,3 +1,3 @@
1
1
  module Directlytos3
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: directlytos3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-08 00:00:00.000000000Z
12
+ date: 2011-12-05 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &70166362487740 !ruby/object:Gem::Requirement
16
+ requirement: &70172755312980 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70166362487740
24
+ version_requirements: *70172755312980
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: actionpack
27
- requirement: &70166362486760 !ruby/object:Gem::Requirement
27
+ requirement: &70172755312480 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '3'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70166362486760
35
+ version_requirements: *70172755312480
36
36
  description: A rails helper to create an S3 upload form
37
37
  email:
38
38
  - scott@tesoriere.com