s3-authorize 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/s3/authorize/version.rb +1 -1
- data/lib/s3/authorize.rb +3 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2dd68668dc27f5ea66c7f5bfd806f98696b6a93a27707a06733c59cf055dad72
|
4
|
+
data.tar.gz: 02add1101c2fba32f9eb860e8a55c05d104a56c34cacb83aa27da35624ab3167
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30d82e81a0788f943474663e47500f98f46965dfa1951120fabbf6aad6d18c6789ceda897105814e97850fc43b9157e306b78eface89677f389980d71610191c
|
7
|
+
data.tar.gz: 57d25f5c511084d5c7406f453af35400869ec4ae8e3c89507120b93229d7d70b06880e7d830ca8f319d25bde33d1300d23542e41ff142684b030a0ac9362dd76
|
data/lib/s3/authorize/version.rb
CHANGED
data/lib/s3/authorize.rb
CHANGED
@@ -24,6 +24,8 @@ module S3
|
|
24
24
|
@bucket = args[:bucket]
|
25
25
|
@acl = args[:acl]
|
26
26
|
@secret_key = args[:secret_key]
|
27
|
+
@min_file_size = args[:min_file_size] || 0
|
28
|
+
@max_file_size = args[:max_file_size] || (10 * 1024 * 1024)
|
27
29
|
end
|
28
30
|
|
29
31
|
# Generate policy
|
@@ -46,7 +48,7 @@ module S3
|
|
46
48
|
{ "acl" => acl },
|
47
49
|
[ "starts-with", "$Content-Type", "" ],
|
48
50
|
[ "starts-with", "$filename", "" ],
|
49
|
-
[ "content-length-range",
|
51
|
+
[ "content-length-range", @min_file_size, @max_file_size ]
|
50
52
|
]
|
51
53
|
}.to_json).gsub(/\n/,'')
|
52
54
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3-authorize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vinh Nguyen
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -78,7 +78,7 @@ homepage: https://github.com/vinhnglx/s3-authorize
|
|
78
78
|
licenses:
|
79
79
|
- MIT
|
80
80
|
metadata: {}
|
81
|
-
post_install_message:
|
81
|
+
post_install_message:
|
82
82
|
rdoc_options: []
|
83
83
|
require_paths:
|
84
84
|
- lib
|
@@ -93,9 +93,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
|
-
rubyforge_project:
|
97
|
-
rubygems_version: 2.
|
98
|
-
signing_key:
|
96
|
+
rubyforge_project:
|
97
|
+
rubygems_version: 2.7.9
|
98
|
+
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: Generate Signature and Policy for upload any files to S3.
|
101
101
|
test_files: []
|