rails-uploader 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uploader/helpers/field_tag.rb +3 -2
- data/lib/uploader/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 566c841fcb9d098a1b256c3aff94e01950cdbb0ace03d1c657e8d9fa3c114314
|
4
|
+
data.tar.gz: 4ac9416e87c31176a81392e1a958fc90e65f3cc5c70d7faf72e37fdadcb21053
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d535a4a9a2c9e40d24826c586f6ebf006934f3194f4600390e783659eadbe37955474b8430a1843ed8db6841afc13998cbaf46e2b935a88bc651fccf8806f33c
|
7
|
+
data.tar.gz: 1ddd6948b2fd9c202b1a1bfeb9ce491964823bd7a3b861a33f2ad34b7c7e09fd6b452c1b5da312344ccdc9f9de1c6b8f8e42c45a2bcd40489f872f4fedf2e322
|
@@ -76,7 +76,7 @@ module Uploader
|
|
76
76
|
@input_html ||= { multiple: multiple?, class: 'uploader' }.merge(input_html_options)
|
77
77
|
@input_html[:data] ||= {}
|
78
78
|
@input_html[:data][:url] ||= attachments_path(singular: !multiple?)
|
79
|
-
@input_html[:accept] ||=
|
79
|
+
@input_html[:accept] ||= extract_extension_whitelist
|
80
80
|
@input_html
|
81
81
|
end
|
82
82
|
|
@@ -84,7 +84,8 @@ module Uploader
|
|
84
84
|
@options.reject { |key, _value| RESERVED_OPTIONS_KEYS.include?(key.to_s) }
|
85
85
|
end
|
86
86
|
|
87
|
-
def
|
87
|
+
def extract_extension_whitelist
|
88
|
+
return unless klass.respond_to?(:uploaders)
|
88
89
|
return unless klass.uploaders[:data].try(:const_defined?, :EXTENSION_WHITELIST)
|
89
90
|
|
90
91
|
exts = klass.uploaders[:data]::EXTENSION_WHITELIST
|
data/lib/uploader/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-uploader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Galeta
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-01-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: carrierwave
|