dropzone_input 1.0.1 → 1.4.0
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 +7 -2
- 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: e65086e0f7524f84bc762666c98450f4f303507fe65c7bbd8989f1dc04742158
|
4
|
+
data.tar.gz: 8c1d7080e724de69620af6fde59f6e1d3cc666010b75932d49d5cea509f9b376
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4abd5cac484394658e79791871585863565532c5f69bae43205024c5b03715d53e84448350765efbd861450117aaaee6cb78aedab64f2262b5d5969b01a82a53
|
7
|
+
data.tar.gz: 862393e7e8ad19c43f388e820dcce767a8ea9f7a63f22e45fe04d348d89a0a83e5be5cff289fea5e7e78226f0bdfeca2148a7ada0be3c224f6a2f9dc1ffaac9e
|
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,12 +15,17 @@ module DropzoneInput
|
|
15
15
|
%i(
|
16
16
|
max_files
|
17
17
|
max_file_size
|
18
|
+
max_thumbnail_file_size
|
19
|
+
file_added_event
|
18
20
|
file_drop_event
|
21
|
+
file_drop_id
|
22
|
+
file_drop_over_id
|
19
23
|
file_progress_event
|
24
|
+
file_removed_event
|
25
|
+
file_start_event
|
20
26
|
file_success_event
|
27
|
+
parallel_uploads
|
21
28
|
queue_complete_event
|
22
|
-
file_drop_id
|
23
|
-
file_drop_over_id
|
24
29
|
).each do |key|
|
25
30
|
data["dropzone_#{key}".to_sym] = options.delete(key) if options.key?(key)
|
26
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.0
|
4
|
+
version: 1.4.0
|
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
|