dropzone_input 1.1.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -0
- data/lib/dropzone_input/helpers.rb +6 -3
- data/lib/dropzone_input/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: 2c222252af65ae10f2918e34e8347a481a8789153f7b63de38dba68a26d6ef00
|
4
|
+
data.tar.gz: c7e6fc8d3868a3314c52249928fbe0609c07824a05f008349758c8a88b495bb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c63999368bcae1efdde40b8bdee7c7360b33d543208e17f631c4c4d0ed22c7155498042182b02fc0001444b1a45954d3a9a6df6db7e9d5eb890391998f1ac9c
|
7
|
+
data.tar.gz: a2523c5b095f92a14c3a1efcb3d30358ca37b901e52d3231aca93cee1c477c6f9a7793a7787a9f5b547496cda92c74485a15a1d8a2573f13d67fabf11adf5d1d
|
data/README.md
CHANGED
@@ -15,6 +15,25 @@ A Rails helper and Stimulus Controller that makes adding dropzone to a Rails for
|
|
15
15
|
specific styles, etc) will be non-configurable at the moment. We will work to generalize this over
|
16
16
|
time and *pull requests are welcome* and will be reviewed quickly.
|
17
17
|
|
18
|
+
## Options & Events
|
19
|
+
|
20
|
+
| Option Name | Description |
|
21
|
+
| -- | -- |
|
22
|
+
| `max_files` | default: `null` |
|
23
|
+
| `max_file_size` | default: `null` |
|
24
|
+
| `max_thumbnail_file_size` | default: `10` |
|
25
|
+
| `parallel_uploads` | default: `2` |
|
26
|
+
|
27
|
+
Events below receive `file` as first parameter.
|
28
|
+
|
29
|
+
| Event Name | Description |
|
30
|
+
| -- | -- |
|
31
|
+
| `file_added_event` | File added to queue |
|
32
|
+
| `file_progress_event` | Periodically called while file is being uploaded. `progress` in the second parameter, or through the `upload` property: `file.upload.progress`, `file.upload.bytesSent` |
|
33
|
+
| `file_removed_event` | File removed from queue |
|
34
|
+
| `file_start_event` | File will start uploading |
|
35
|
+
| `file_success_event` | File successfully uploaded |
|
36
|
+
|
18
37
|
## Installation
|
19
38
|
|
20
39
|
Add to your Gemfile.
|
@@ -15,14 +15,17 @@ module DropzoneInput
|
|
15
15
|
%i(
|
16
16
|
max_files
|
17
17
|
max_file_size
|
18
|
+
max_thumbnail_file_size
|
18
19
|
file_added_event
|
19
|
-
file_removed_event
|
20
20
|
file_drop_event
|
21
|
+
file_drop_id
|
22
|
+
file_drop_over_id
|
21
23
|
file_progress_event
|
24
|
+
file_removed_event
|
25
|
+
file_start_event
|
22
26
|
file_success_event
|
27
|
+
parallel_uploads
|
23
28
|
queue_complete_event
|
24
|
-
file_drop_id
|
25
|
-
file_drop_over_id
|
26
29
|
).each do |key|
|
27
30
|
data["dropzone_#{key}".to_sym] = options.delete(key) if options.key?(key)
|
28
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dropzone_input
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Trae Robrock
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|