s3ff 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -8
- data/app/assets/javascripts/s3ff.js +4 -0
- data/lib/s3ff/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ab82d0c43f5bc28968c06a40939bc3883f454ed
|
4
|
+
data.tar.gz: 72956174b49ff57a0a014ae50d38f1edcc8a7890
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df29ec657a8a95edd62172ec8d25d49f79e780e2eeeda20b55f971e6405f95ea2caeecb76d8c7a66603b09a3ee8f0c92e1315ba24208f6ad318e1b49b57829e4
|
7
|
+
data.tar.gz: 7ef2682ad8158cc7424d2cdc0ce40a82ef7dc0d4f9b73dde233893aa2c006a2c13c7d3b9ebd9fb6b28dccfddee545c6e8470dd7c67032c351916ca9fc27d8534
|
data/README.md
CHANGED
@@ -23,7 +23,7 @@ Or install it yourself as:
|
|
23
23
|
|
24
24
|
### 1. Configure s3_file_field
|
25
25
|
|
26
|
-
add a config like
|
26
|
+
add a config like [sample/config_s3_file_field.rb](https://github.com/jollygoodcode/s3ff/blob/master/sample/config_s3_file_field.rb) into your Rails `config/initializers/` directory
|
27
27
|
|
28
28
|
### 2. Add javascript
|
29
29
|
|
@@ -111,12 +111,11 @@ class User < ActiveRecord::Base
|
|
111
111
|
# s3ff changes
|
112
112
|
|
113
113
|
def avatar_direct_url=(value)
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
upload.content_type = Paperclip::ContentTypeDetector.new(upload.path).detect
|
114
|
+
open(value, ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE) do |file|
|
115
|
+
self.attributes = {
|
116
|
+
avatar: file,
|
117
|
+
avatar_file_name: File.basename(value),
|
118
|
+
}
|
120
119
|
end
|
121
120
|
end
|
122
121
|
end
|
@@ -124,7 +123,7 @@ end
|
|
124
123
|
|
125
124
|
#### CAVEAT
|
126
125
|
|
127
|
-
It
|
126
|
+
It is not ideal to handle your attachment processing synchronously inside the web request. For usage with `Sidekiq` or `DelayedJob`, look at the reference code in [sample/user.*.rb](https://github.com/jollygoodcode/s3ff/tree/master/sample)
|
128
127
|
|
129
128
|
|
130
129
|
## Contributing
|
@@ -24,6 +24,10 @@ $(function() {
|
|
24
24
|
};
|
25
25
|
|
26
26
|
var s3ff_handlers = {
|
27
|
+
drop: function(e, data) {
|
28
|
+
if (that[0] != e.originalEvent.target) return e.preventDefault();
|
29
|
+
if (! multi) label.children('.s3ff_section').remove();
|
30
|
+
},
|
27
31
|
change: function(e, data) {
|
28
32
|
if (! multi) label.children('.s3ff_section').remove();
|
29
33
|
},
|
data/lib/s3ff/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3ff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chew Choon Keat
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: s3_file_field
|