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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4f03cfcfa9114f7c9121c5c82a9d307ce69c9a0c5a27789e906ed1692969234
4
- data.tar.gz: 3d90a1417cacd85afb1ecb3558b5bad166c38df14512bc35e23578fed8d618d8
3
+ metadata.gz: e65086e0f7524f84bc762666c98450f4f303507fe65c7bbd8989f1dc04742158
4
+ data.tar.gz: 8c1d7080e724de69620af6fde59f6e1d3cc666010b75932d49d5cea509f9b376
5
5
  SHA512:
6
- metadata.gz: 8466730e8d6a1fac07e1ed5b9131559958e9848ce8ea2136cea37ae9d825e41d9efb5a530dc3da4187fb3a6fce142dc2de7d65c170b320a2a8237f295c98cca0
7
- data.tar.gz: 4715a836cd355621bfd9091c2dd493e479f2f65d24d79df264158e616cfbd4f53e9b9a49c2359bb5934b521241fb128ba6a8c24e4783f4314da60faa51a42d81
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DropzoneInput
4
- VERSION = '1.0.1'
4
+ VERSION = '1.4.0'
5
5
  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.1
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-01-13 00:00:00.000000000 Z
11
+ date: 2021-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails