carrierwave 0.11.2 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of carrierwave might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/README.md +255 -125
- data/lib/carrierwave/compatibility/paperclip.rb +0 -2
- data/lib/carrierwave/error.rb +1 -0
- data/lib/carrierwave/locale/en.yml +7 -4
- data/lib/carrierwave/mount.rb +219 -176
- data/lib/carrierwave/mounter.rb +165 -0
- data/lib/carrierwave/orm/activerecord.rb +50 -21
- data/lib/carrierwave/processing/mini_magick.rb +86 -15
- data/lib/carrierwave/processing/rmagick.rb +63 -8
- data/lib/carrierwave/processing.rb +0 -1
- data/lib/carrierwave/sanitized_file.rb +51 -46
- data/lib/carrierwave/storage/abstract.rb +15 -2
- data/lib/carrierwave/storage/file.rb +69 -2
- data/lib/carrierwave/storage/fog.rb +152 -33
- data/lib/carrierwave/storage.rb +0 -9
- data/lib/carrierwave/test/matchers.rb +77 -12
- data/lib/carrierwave/uploader/cache.rb +41 -27
- data/lib/carrierwave/uploader/callbacks.rb +0 -2
- data/lib/carrierwave/uploader/configuration.rb +54 -9
- data/lib/carrierwave/uploader/content_type_whitelist.rb +1 -1
- data/lib/carrierwave/uploader/default_url.rb +3 -5
- data/lib/carrierwave/uploader/download.rb +66 -15
- data/lib/carrierwave/uploader/extension_blacklist.rb +14 -10
- data/lib/carrierwave/uploader/extension_whitelist.rb +13 -10
- data/lib/carrierwave/uploader/file_size.rb +43 -0
- data/lib/carrierwave/uploader/mountable.rb +7 -8
- data/lib/carrierwave/uploader/processing.rb +10 -10
- data/lib/carrierwave/uploader/proxy.rb +5 -7
- data/lib/carrierwave/uploader/remove.rb +0 -2
- data/lib/carrierwave/uploader/serialization.rb +1 -3
- data/lib/carrierwave/uploader/store.rb +14 -23
- data/lib/carrierwave/uploader/url.rb +3 -5
- data/lib/carrierwave/uploader/versions.rb +82 -82
- data/lib/carrierwave/uploader.rb +11 -2
- data/lib/carrierwave/utilities/uri.rb +5 -6
- data/lib/carrierwave/utilities.rb +0 -3
- data/lib/carrierwave/validations/active_model.rb +3 -5
- data/lib/carrierwave/version.rb +1 -1
- data/lib/carrierwave.rb +32 -10
- data/lib/generators/templates/uploader.rb +4 -8
- metadata +64 -79
- data/lib/carrierwave/locale/cs.yml +0 -11
- data/lib/carrierwave/locale/de.yml +0 -11
- data/lib/carrierwave/locale/el.yml +0 -11
- data/lib/carrierwave/locale/es.yml +0 -11
- data/lib/carrierwave/locale/fr.yml +0 -11
- data/lib/carrierwave/locale/ja.yml +0 -11
- data/lib/carrierwave/locale/nb.yml +0 -11
- data/lib/carrierwave/locale/nl.yml +0 -11
- data/lib/carrierwave/locale/pl.yml +0 -11
- data/lib/carrierwave/locale/pt-BR.yml +0 -11
- data/lib/carrierwave/locale/pt-PT.yml +0 -11
- data/lib/carrierwave/locale/ru.yml +0 -11
- data/lib/carrierwave/locale/sk.yml +0 -11
- data/lib/carrierwave/locale/tr.yml +0 -11
- data/lib/carrierwave/processing/mime_types.rb +0 -74
- data/lib/carrierwave/utilities/deprecation.rb +0 -18
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carrierwave
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Nicklas
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,42 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 4.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 4.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activemodel
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 4.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: json
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '1.7'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '1.7'
|
40
|
+
version: 4.0.0
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: mime-types
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,19 +53,19 @@ dependencies:
|
|
67
53
|
- !ruby/object:Gem::Version
|
68
54
|
version: '1.16'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
56
|
+
name: ssrf_filter
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
|
-
- - "
|
59
|
+
- - "~>"
|
74
60
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
61
|
+
version: '1.0'
|
76
62
|
type: :runtime
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
|
-
- - "
|
66
|
+
- - "~>"
|
81
67
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
68
|
+
version: '1.0'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: pg
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,44 +86,44 @@ dependencies:
|
|
100
86
|
requirements:
|
101
87
|
- - ">="
|
102
88
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
89
|
+
version: 4.0.0
|
104
90
|
type: :development
|
105
91
|
prerelease: false
|
106
92
|
version_requirements: !ruby/object:Gem::Requirement
|
107
93
|
requirements:
|
108
94
|
- - ">="
|
109
95
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
96
|
+
version: 4.0.0
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
98
|
name: cucumber
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
114
100
|
requirements:
|
115
101
|
- - "~>"
|
116
102
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
103
|
+
version: '2.3'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
107
|
requirements:
|
122
108
|
- - "~>"
|
123
109
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
110
|
+
version: '2.3'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
name: rspec
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
128
114
|
requirements:
|
129
115
|
- - "~>"
|
130
116
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
117
|
+
version: '3.4'
|
132
118
|
type: :development
|
133
119
|
prerelease: false
|
134
120
|
version_requirements: !ruby/object:Gem::Requirement
|
135
121
|
requirements:
|
136
122
|
- - "~>"
|
137
123
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
124
|
+
version: '3.4'
|
139
125
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
126
|
+
name: webmock
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
142
128
|
requirements:
|
143
129
|
- - ">="
|
@@ -151,21 +137,35 @@ dependencies:
|
|
151
137
|
- !ruby/object:Gem::Version
|
152
138
|
version: '0'
|
153
139
|
- !ruby/object:Gem::Dependency
|
154
|
-
name: fog
|
140
|
+
name: fog-aws
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: fog-google
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1.
|
159
|
+
version: 1.7.1
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 1.
|
166
|
+
version: 1.7.1
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
168
|
+
name: fog-local
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - ">="
|
@@ -179,19 +179,19 @@ dependencies:
|
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
182
|
+
name: fog-rackspace
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
|
-
- - "
|
185
|
+
- - ">="
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version:
|
187
|
+
version: '0'
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
|
-
- - "
|
192
|
+
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
194
|
+
version: '0'
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: mini_magick
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -210,46 +210,46 @@ dependencies:
|
|
210
210
|
name: rmagick
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
|
-
- - "
|
213
|
+
- - "~>"
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version: '
|
215
|
+
version: '2.16'
|
216
216
|
type: :development
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
|
-
- - "
|
220
|
+
- - "~>"
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version: '
|
222
|
+
version: '2.16'
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
|
-
name:
|
224
|
+
name: timecop
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
226
226
|
requirements:
|
227
|
-
- - "
|
227
|
+
- - ">="
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version:
|
229
|
+
version: '0'
|
230
230
|
type: :development
|
231
231
|
prerelease: false
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
|
-
- - "
|
234
|
+
- - ">="
|
235
235
|
- !ruby/object:Gem::Version
|
236
|
-
version:
|
236
|
+
version: '0'
|
237
237
|
- !ruby/object:Gem::Dependency
|
238
|
-
name:
|
238
|
+
name: generator_spec
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|
240
240
|
requirements:
|
241
|
-
- -
|
241
|
+
- - ">="
|
242
242
|
- !ruby/object:Gem::Version
|
243
|
-
version: 0.
|
243
|
+
version: 0.9.1
|
244
244
|
type: :development
|
245
245
|
prerelease: false
|
246
246
|
version_requirements: !ruby/object:Gem::Requirement
|
247
247
|
requirements:
|
248
|
-
- -
|
248
|
+
- - ">="
|
249
249
|
- !ruby/object:Gem::Version
|
250
|
-
version: 0.
|
250
|
+
version: 0.9.1
|
251
251
|
- !ruby/object:Gem::Dependency
|
252
|
-
name:
|
252
|
+
name: pry
|
253
253
|
requirement: !ruby/object:Gem::Requirement
|
254
254
|
requirements:
|
255
255
|
- - ">="
|
@@ -275,25 +275,11 @@ files:
|
|
275
275
|
- lib/carrierwave.rb
|
276
276
|
- lib/carrierwave/compatibility/paperclip.rb
|
277
277
|
- lib/carrierwave/error.rb
|
278
|
-
- lib/carrierwave/locale/cs.yml
|
279
|
-
- lib/carrierwave/locale/de.yml
|
280
|
-
- lib/carrierwave/locale/el.yml
|
281
278
|
- lib/carrierwave/locale/en.yml
|
282
|
-
- lib/carrierwave/locale/es.yml
|
283
|
-
- lib/carrierwave/locale/fr.yml
|
284
|
-
- lib/carrierwave/locale/ja.yml
|
285
|
-
- lib/carrierwave/locale/nb.yml
|
286
|
-
- lib/carrierwave/locale/nl.yml
|
287
|
-
- lib/carrierwave/locale/pl.yml
|
288
|
-
- lib/carrierwave/locale/pt-BR.yml
|
289
|
-
- lib/carrierwave/locale/pt-PT.yml
|
290
|
-
- lib/carrierwave/locale/ru.yml
|
291
|
-
- lib/carrierwave/locale/sk.yml
|
292
|
-
- lib/carrierwave/locale/tr.yml
|
293
279
|
- lib/carrierwave/mount.rb
|
280
|
+
- lib/carrierwave/mounter.rb
|
294
281
|
- lib/carrierwave/orm/activerecord.rb
|
295
282
|
- lib/carrierwave/processing.rb
|
296
|
-
- lib/carrierwave/processing/mime_types.rb
|
297
283
|
- lib/carrierwave/processing/mini_magick.rb
|
298
284
|
- lib/carrierwave/processing/rmagick.rb
|
299
285
|
- lib/carrierwave/sanitized_file.rb
|
@@ -312,6 +298,7 @@ files:
|
|
312
298
|
- lib/carrierwave/uploader/download.rb
|
313
299
|
- lib/carrierwave/uploader/extension_blacklist.rb
|
314
300
|
- lib/carrierwave/uploader/extension_whitelist.rb
|
301
|
+
- lib/carrierwave/uploader/file_size.rb
|
315
302
|
- lib/carrierwave/uploader/mountable.rb
|
316
303
|
- lib/carrierwave/uploader/processing.rb
|
317
304
|
- lib/carrierwave/uploader/proxy.rb
|
@@ -321,7 +308,6 @@ files:
|
|
321
308
|
- lib/carrierwave/uploader/url.rb
|
322
309
|
- lib/carrierwave/uploader/versions.rb
|
323
310
|
- lib/carrierwave/utilities.rb
|
324
|
-
- lib/carrierwave/utilities/deprecation.rb
|
325
311
|
- lib/carrierwave/utilities/uri.rb
|
326
312
|
- lib/carrierwave/validations/active_model.rb
|
327
313
|
- lib/carrierwave/version.rb
|
@@ -331,7 +317,7 @@ homepage: https://github.com/carrierwaveuploader/carrierwave
|
|
331
317
|
licenses:
|
332
318
|
- MIT
|
333
319
|
metadata: {}
|
334
|
-
post_install_message:
|
320
|
+
post_install_message:
|
335
321
|
rdoc_options:
|
336
322
|
- "--main"
|
337
323
|
require_paths:
|
@@ -340,16 +326,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
340
326
|
requirements:
|
341
327
|
- - ">="
|
342
328
|
- !ruby/object:Gem::Version
|
343
|
-
version:
|
329
|
+
version: 2.0.0
|
344
330
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
345
331
|
requirements:
|
346
332
|
- - ">="
|
347
333
|
- !ruby/object:Gem::Version
|
348
334
|
version: '0'
|
349
335
|
requirements: []
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
specification_version: 3
|
336
|
+
rubygems_version: 3.1.2
|
337
|
+
signing_key:
|
338
|
+
specification_version: 4
|
354
339
|
summary: Ruby file upload library
|
355
340
|
test_files: []
|
@@ -1,11 +0,0 @@
|
|
1
|
-
cs:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
carrierwave_processing_error: se nepodařilo zpracovat
|
5
|
-
carrierwave_integrity_error: není povolený typ souboru
|
6
|
-
carrierwave_download_error: nemůže být stažen
|
7
|
-
extension_white_list_error: "Není možné nahrávat %{extension} soubory, povolené typy: %{allowed_types}"
|
8
|
-
extension_black_list_error: "Není možné nahrávat %{extension} soubory, zakázané typy: %{prohibited_types}"
|
9
|
-
rmagick_processing_error: "Nepodařilo se upravit pomocí rmagick, možná se nejedná o obrázek? Hlášená Chyba: %{e}"
|
10
|
-
mime_types_processing_error: "Nepodařilo se upravit s MIME::Types, možná se nejedná o content-type? Hlášená Chyba: %{e}"
|
11
|
-
mini_magick_processing_error: "Nepodařilo se upravit pomocí MiniMagick, možná se nejedná o obrázek? Hlášená Chyba: %{e}"
|
@@ -1,11 +0,0 @@
|
|
1
|
-
de:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
carrierwave_processing_error: konnte nicht verarbeitet werden
|
5
|
-
carrierwave_integrity_error: ist kein erlaubter Dateityp
|
6
|
-
carrierwave_download_error: konnte nicht heruntergeladen werden
|
7
|
-
extension_white_list_error: "Sie sind nicht berechtigt %{extension} Dateien hochzuladen, erlaubte Typen: %{allowed_types}"
|
8
|
-
extension_black_list_error: "Sie sind nicht berechtigt %{extension} Dateien hochzuladen, verbotene Typen: %{prohibited_types}"
|
9
|
-
rmagick_processing_error: "Verarbeitung mit rmagick fehlgeschlagen, vielleicht ist es kein Bild? Original Fehler: %{e}"
|
10
|
-
mime_types_processing_error: "Verarbeitung mit MIME::Types fehlgeschlagen, vielleicht kein gültiger content-type? Original Fehler: %{e}"
|
11
|
-
mini_magick_processing_error: "Verarbeitung mit MiniMagick fehlgeschlagen, vielleicht ist es kein Bild? Original Fehler: %{e}"
|
@@ -1,11 +0,0 @@
|
|
1
|
-
el:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
carrierwave_processing_error: "απέτυχε στην επεξεργασία"
|
5
|
-
carrierwave_integrity_error: "δεν ανήκει σε επιτρεπτό τύπο αρχείου"
|
6
|
-
carrierwave_download_error: "δεν ήταν δυνατό να μεταφορτωθεί"
|
7
|
-
extension_white_list_error: "Δεν επιτρέπεται το ανέβασμα αρχείων %{extension}, επιτρεπτοί τύποι: %{allowed_types}"
|
8
|
-
extension_black_list_error: "Δεν επιτρέπεται το ανέβασμα αρχείων %{extension}, μη επιτρεπτοί τύποι: %{prohibited_types}"
|
9
|
-
rmagick_processing_error: "Απέτυχε ο χειρισμός με rmagick, ίσως δεν είναι εικόνα; Αρχικό Σφάλμα: %{e}"
|
10
|
-
mime_types_processing_error: "Απέτυχε η επεξεργασία του αρχείου με MIME::Types, ίσως δεν έχει έγκυρο content-type; Αρχικό Σφάλμα: %{e}"
|
11
|
-
mini_magick_processing_error: "Απέτυχε ο χειρισμός με MiniMagick, ίσως δεν είναι εικόνα; Αρχικό Σφάλμα: %{e}"
|
@@ -1,11 +0,0 @@
|
|
1
|
-
es:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
carrierwave_processing_error: no se pudo procesar
|
5
|
-
carrierwave_integrity_error: no es de un tipo de archivo permitido
|
6
|
-
carrierwave_download_error: no se pudo descargar
|
7
|
-
extension_white_list_error: "No se pueden subir archivos de esta extensión %{extension}, las extensiones permitidas son: %{allowed_types}"
|
8
|
-
extension_black_list_error: "No se pueden subir archivos de esta extensión %{extension}, las extensiones prohibidas son: %{allowed_types}"
|
9
|
-
rmagick_processing_error: "No se pudo manipular con rmagick, quizá porque no es una imágen? Error original: %{e}"
|
10
|
-
mime_types_processing_error: "No se pudo procesar archivo con MIME::Types, quizá no tiene el content-type correcto? Error original: %{e}"
|
11
|
-
mini_magick_processing_error: "No se pudo manipular con MiniMagick, quizá porque no es una imágen? Error original: %{e}"
|
@@ -1,11 +0,0 @@
|
|
1
|
-
fr:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
carrierwave_processing_error: "Impossible de redimensionner l'image."
|
5
|
-
carrierwave_integrity_error: "Ce n'est pas une image."
|
6
|
-
carrierwave_download_error: "Impossible de télécharger l'image."
|
7
|
-
extension_white_list_error: "Vous n'êtes pas autorisé à uploader des fichiers %{extension}, types autorisés: %{allowed_types}"
|
8
|
-
extension_black_list_error: "Vous n'êtes pas autorisé à uploader des fichiers %{extension}, types interdits: %{prohibited_types}"
|
9
|
-
rmagick_processing_error: "La manipulation d'image avec rmagick a échoué. Peut-être que ce n'est pas une image ? Erreur originale: %{e}"
|
10
|
-
mime_types_processing_error: "Le traitement de fichier avec MIME::Types a échoué. Peut-être que ce n'est pas un type valide ? Erreur originale: %{e}"
|
11
|
-
mini_magick_processing_error: "La manipulation d'image avec MiniMagick a échoué. Peut-être que ce n'est pas une image ? Erreur originale: %{e}"
|
@@ -1,11 +0,0 @@
|
|
1
|
-
ja:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
carrierwave_processing_error: 処理できませんでした
|
5
|
-
carrierwave_integrity_error: は許可されていないファイルタイプです
|
6
|
-
carrierwave_download_error: はダウンロードできません
|
7
|
-
extension_white_list_error: "%{extension}ファイルのアップロードは許可されていません。アップロードできるファイルタイプ: %{allowed_types}"
|
8
|
-
extension_black_list_error: "%{extension}ファイルのアップロードは許可されていません。アップロードできないファイルタイプ: %{prohibited_types}"
|
9
|
-
rmagick_processing_error: "rmagickがファイルを処理できませんでした。画像を確認してください。エラーメッセージ: %{e}"
|
10
|
-
mime_types_processing_error: "MIME::Typesのファイルを処理できませんでした。Content-Typeを確認してください。エラーメッセージ: %{e}"
|
11
|
-
mini_magick_processing_error: "MiniMagickがファイルを処理できませんでした。画像を確認してください。エラーメッセージ: %{e}"
|
@@ -1,11 +0,0 @@
|
|
1
|
-
nb:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
carrierwave_processing_error: kunne ikke behandles
|
5
|
-
carrierwave_integrity_error: er ikke en tillatt filtype
|
6
|
-
carrierwave_download_error: kunne ikke lastes ned
|
7
|
-
extension_white_list_error: "Du kan ikke laste opp %{extension}-filer, tillatte filtyper: %{allowed_types}"
|
8
|
-
extension_black_list_error: "Du kan ikke laste opp %{extension}-filer, forbudte filtyper: %{prohibited_types}"
|
9
|
-
rmagick_processing_error: "Kunne ikke manipulere med rmagick. Er du sikker på at det er et bilde? Feilmelding: %{e}"
|
10
|
-
mime_types_processing_error: "Kunne ikke behandle fil med MIME::Types. Er du sikker på at content-type er korrekt? Feilmelding: %{e}"
|
11
|
-
mini_magick_processing_error: "Kunne ikke manipulere med MiniMagick. Er du sikker på at det er et bilde? Feilmelding: %{e}"
|
@@ -1,11 +0,0 @@
|
|
1
|
-
nl:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
carrierwave_processing_error: kon niet worden verwerkt
|
5
|
-
carrierwave_integrity_error: is niet van een toegestaan bestandstype
|
6
|
-
carrierwave_download_error: kon niet gedownload worden
|
7
|
-
extension_white_list_error: "Het is niet toegestaan om %{extension} bestanden te uploaden; toegestane bestandstypes: %{allowed_types}"
|
8
|
-
extension_black_list_error: "Het is niet toegestaan om %{extension} bestanden te uploaden; verboden bestandstypes: %{prohibited_types}"
|
9
|
-
rmagick_processing_error: "Bewerking met rmagick is mislukt, misschien is het geen afbeelding? Originele foutmelding: %{e}"
|
10
|
-
mime_types_processing_error: "Verwerking van bestand met MIME::Types is mislukt, misschien is het geen geldig content-type? Originele foutmelding: %{e}"
|
11
|
-
mini_magick_processing_error: "Bewerking met MiniMagick is mislukt, misschien is het geen afbeelding? Originele foutmelding: %{e}"
|
@@ -1,11 +0,0 @@
|
|
1
|
-
pl:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
carrierwave_processing_error: nie można przetworzyć
|
5
|
-
carrierwave_integrity_error: niedozwolony typ pliku
|
6
|
-
carrierwave_download_error: nie można pobrać pliku
|
7
|
-
extension_white_list_error: "Nie można wgrać pliku o rozszerzeniu %{extension}, dozwolone typy plików: %{allowed_types}"
|
8
|
-
extension_black_list_error: "Nie można wgrać pliku o rozszerzeniu %{extension}, zakazane typy plików: %{prohibited_types}"
|
9
|
-
rmagick_processing_error: "Nie udało się przetworzyć pliku przy pomocy rmagick, może to nie jest obrazek? Oryginalna treść błędu: %{e}"
|
10
|
-
mime_types_processing_error: "Nie udało się przetworzyć pliku przy pomocy MIME::Types, może content-type jest niepoprawny? Oryginalna treść błędu: %{e}"
|
11
|
-
mini_magick_processing_error: "Nie udało się przetworzyć pliku przy pomocy MiniMagick, może to nie jest obrazek? Oryginalna treść błędu: %{e}"
|
@@ -1,11 +0,0 @@
|
|
1
|
-
pt-BR:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
carrierwave_processing_error: falhou em ser processado
|
5
|
-
carrierwave_integrity_error: não é um tipo de arquivo permitido
|
6
|
-
carrierwave_download_error: não pôde ser baixado
|
7
|
-
extension_white_list_error: "Não é permitido o envio de arquivos %{extension}, tipos permitidos: %{allowed_types}"
|
8
|
-
extension_black_list_error: "Não é permitido o envio de arquivos %{extension}, tipos proibidos: %{prohibited_types}"
|
9
|
-
rmagick_processing_error: "Falha ao manipular com RMagick, talvez arquivo não seja uma imagem? Erro original: %{e}"
|
10
|
-
mime_types_processing_error: "Falha ao processar arquivo com MIME::Types, talvez content-type seja inválido? Erro original: %{e}"
|
11
|
-
mini_magick_processing_error: "Falha ao manipular com MiniMagick, talvez arquivo não seja uma imagem? Erro original: %{e}"
|
@@ -1,11 +0,0 @@
|
|
1
|
-
pt-PT:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
carrierwave_processing_error: falhou ao ser processado
|
5
|
-
carrierwave_integrity_error: não é um tipo de ficheiro permitido
|
6
|
-
carrierwave_download_error: não pôde ser transferido
|
7
|
-
extension_white_list_error: "Não é permitido o envio de ficheiros com a extensão %{extension}, tipos de ficheiro permitidos: %{allowed_types}"
|
8
|
-
extension_black_list_error: "Não é permitido o envio de ficheiros com a extensão %{extension}, tipos de ficheiro proibidos: %{prohibited_types}"
|
9
|
-
rmagick_processing_error: "Ocorreu uma falha ao processar com rmagick, talvez o ficheiro não seja uma imagem? Erro original: %{e}"
|
10
|
-
mime_types_processing_error: "Ocorreu uma falha ao processar com MIME::Types, talvez o parâmetro content-type não seja válido? Erro original: %{e}"
|
11
|
-
mini_magick_processing_error: "Ocorreu uma falha ao processar com MiniMagick, talvez o ficheiro não seja uma imagem? Erro original: %{e}"
|
@@ -1,11 +0,0 @@
|
|
1
|
-
ru:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
carrierwave_processing_error: Невозможно обработать изображение
|
5
|
-
carrierwave_integrity_error: Файл не является изображением
|
6
|
-
carrierwave_download_error: Невозможно скачать файл
|
7
|
-
extension_white_list_error: "Вы не можете загружать файлы типа %{extension}, разрешенные типы: %{allowed_types}"
|
8
|
-
extension_black_list_error: "Вы не можете загружать файлы типа %{extension}, запрещенные типы: %{prohibited_types}"
|
9
|
-
rmagick_processing_error: "Ошибка взаимодействия с RMagick, может быть это не изображение? Исходная ошибка: %{e}"
|
10
|
-
mime_types_processing_error: "Не получилось обработать файл с MIME::Types, возможно неправильный content-type? Исходная ошибка: %{e}"
|
11
|
-
mini_magick_processing_error: "Ошибка взаимодействия с MiniMagick, может быть это не изображение? Исходная ошибка: %{e}"
|
@@ -1,11 +0,0 @@
|
|
1
|
-
sk:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
carrierwave_processing_error: sa nepodarilo spracovať
|
5
|
-
carrierwave_integrity_error: nie je povolený typ súboru
|
6
|
-
carrierwave_download_error: nie je možné stiahnuť
|
7
|
-
extension_white_list_error: "Nie je možné nahrávať %{extension} súbory, povolené typy: %{allowed_types}"
|
8
|
-
extension_black_list_error: "Nie je možné nahrávať %{extension} súbory, zakázané typy: %{prohibited_types}"
|
9
|
-
rmagick_processing_error: "Nepodarilo sa upraviť pomocou rmagick, možno nejde o obrázok? Hlásená chyba: %{e}"
|
10
|
-
mime_types_processing_error: "Súbor sa nepodarilo spracovať pomocou MIME::Types, možno nejde o valídny content-type? Hlásená chyba: %{e}"
|
11
|
-
mini_magick_processing_error: "Nepodarilo sa upraviť pomocou MiniMagick, možno nejde o obrázok? Hlásená chyba: %{e}"
|
@@ -1,11 +0,0 @@
|
|
1
|
-
tr:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
carrierwave_processing_error: işlenmesi sırasında hata oluştu
|
5
|
-
carrierwave_integrity_error: izin verilebilir bir dosya türü değil
|
6
|
-
carrierwave_download_error: indirilemedi
|
7
|
-
extension_white_list_error: "%{extension} uzantılı dosyaları yükleme izniniz yok, izin verilen uzantılar: %{allowed_types}"
|
8
|
-
extension_black_list_error: "%{extension} uzantılı dosyaları yükleme izniniz yok, izin verilmeyen uzantılar: %{prohibited_types}"
|
9
|
-
rmagick_processing_error: "Resim rmagick ile düzenlenemedi, belkide resim değildir? Orjinal Hata: %{e}"
|
10
|
-
mime_types_processing_error: "Dosya, MIME::Types kullanılarak işlenemedi, belkide geçerli bir içerik türü değildir? Orjinal Hata: %{e}"
|
11
|
-
mini_magick_processing_error: "Resim MiniMagick ile düzenlenemedi, belkide resim değildir? Orjinal Hata: %{e}"
|
@@ -1,74 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module CarrierWave
|
4
|
-
|
5
|
-
##
|
6
|
-
# This module simplifies the use of the mime-types gem to intelligently
|
7
|
-
# guess and set the content-type of a file. If you want to use this, you'll
|
8
|
-
# need to require this file:
|
9
|
-
#
|
10
|
-
# require 'carrierwave/processing/mime_types'
|
11
|
-
#
|
12
|
-
# And then include it in your uploader:
|
13
|
-
#
|
14
|
-
# class MyUploader < CarrierWave::Uploader::Base
|
15
|
-
# include CarrierWave::MimeTypes
|
16
|
-
# end
|
17
|
-
#
|
18
|
-
# You can now use the provided helper:
|
19
|
-
#
|
20
|
-
# class MyUploader < CarrierWave::Uploader::Base
|
21
|
-
# include CarrierWave::MimeTypes
|
22
|
-
#
|
23
|
-
# process :set_content_type
|
24
|
-
# end
|
25
|
-
#
|
26
|
-
module MimeTypes
|
27
|
-
extend ActiveSupport::Concern
|
28
|
-
|
29
|
-
included do
|
30
|
-
CarrierWave::Utilities::Deprecation.new "0.11.0", "CarrierWave::MimeTypes is deprecated and will be removed in the future, get the content_type from the SanitizedFile object directly."
|
31
|
-
begin
|
32
|
-
require "mime/types"
|
33
|
-
rescue LoadError => e
|
34
|
-
e.message << " (You may need to install the mime-types gem)"
|
35
|
-
raise e
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
module ClassMethods
|
40
|
-
def set_content_type(override=false)
|
41
|
-
process :set_content_type => override
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
GENERIC_CONTENT_TYPES = %w[application/octet-stream binary/octet-stream]
|
46
|
-
|
47
|
-
def generic_content_type?
|
48
|
-
GENERIC_CONTENT_TYPES.include? file.content_type
|
49
|
-
end
|
50
|
-
|
51
|
-
##
|
52
|
-
# Changes the file content_type using the mime-types gem
|
53
|
-
#
|
54
|
-
# === Parameters
|
55
|
-
#
|
56
|
-
# [override (Boolean)] whether or not to override the file's content_type
|
57
|
-
# if it is already set and not a generic content-type,
|
58
|
-
# false by default
|
59
|
-
#
|
60
|
-
def set_content_type(override=false)
|
61
|
-
if override || file.content_type.blank? || generic_content_type?
|
62
|
-
new_content_type = ::MIME::Types.type_for(file.original_filename).first.to_s
|
63
|
-
if file.respond_to?(:content_type=)
|
64
|
-
file.content_type = new_content_type
|
65
|
-
else
|
66
|
-
file.instance_variable_set(:@content_type, new_content_type)
|
67
|
-
end
|
68
|
-
end
|
69
|
-
rescue ::MIME::InvalidContentType => e
|
70
|
-
raise CarrierWave::ProcessingError, I18n.translate(:"errors.messages.mime_types_processing_error", :e => e)
|
71
|
-
end
|
72
|
-
|
73
|
-
end # MimeTypes
|
74
|
-
end # CarrierWave
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
require 'active_support/deprecation'
|
3
|
-
|
4
|
-
module CarrierWave
|
5
|
-
module Utilities
|
6
|
-
module Deprecation
|
7
|
-
|
8
|
-
def self.new version = '0.11.0', message = 'Carrierwave'
|
9
|
-
if ActiveSupport::VERSION::MAJOR < 4
|
10
|
-
ActiveSupport::Deprecation.warn("#{message} (will be removed from version #{version})")
|
11
|
-
else
|
12
|
-
ActiveSupport::Deprecation.new(version, message)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
end # Deprecation
|
17
|
-
end # Utilities
|
18
|
-
end # CarrierWave
|