image_input 0.0.4 → 0.0.5

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: 0a60c559fc547a126d4786f8824f501dc0cdf424762cb2be77a374dd72b16207
4
- data.tar.gz: a91af36aee1196eed5ed5cf20ba01d1ac7e3b60af321882e8ac05610a85de01e
3
+ metadata.gz: 52ebcc38110ac7d9c868744d36485ac2bc336b90d0b6f1651acef5711546655e
4
+ data.tar.gz: 8fcd2c947ae62c09ffb1a88cf07be82c85e20696b94ba4f52f06cc3c1186c947
5
5
  SHA512:
6
- metadata.gz: eeb1f2e83c7e12fc3c49fe7de8c81c1f084d7714fb6d084bb3a894570384e346f06ec40933130c7fb06dccbac5d7157c24fcc0f81428e5b4f94efee59938d8b2
7
- data.tar.gz: 7e3e26c2cbcf5f3f7a9c858d5982d6aa30309e23a353b5169812788dd10d46dbc9dbbf6f123ff1129f274c9045d78f11ff1213ea390b1e49fda263cc4ec7a1c6
6
+ metadata.gz: d53fc39c634346f0210d738de9282090b669def6282e47ed3a496b509f3db789472f1401bc390e2ff9689c6a5100c7ccfb91a0bf76cb1186dff627f29f90954d
7
+ data.tar.gz: 86da5d9f0f2f9f64d89c85f89abc6d7dcb843eb991bb98dc9b2d1146bc7ca16c4ce09cef931c4a2e3d3e9dcbd2d4621c87b21726556c15b5b7d34d9fcf0d4865
@@ -3,6 +3,7 @@
3
3
  field,
4
4
  class: 'hidden',
5
5
  accept: accept,
6
+ direct_upload: direct_upload,
6
7
  data: {
7
8
  target: 'image-input.field',
8
9
  action: 'change->image-input#onFileChosen'
@@ -2,13 +2,14 @@
2
2
 
3
3
  module ImageInput
4
4
  module Helpers
5
- def image_input(form, field, accept: %i(png jpeg gif))
5
+ def image_input(form, field, accept: %i(png jpeg gif), direct_upload: true)
6
6
  render(
7
7
  'image_input/input',
8
8
  form: form,
9
9
  field: field,
10
10
  blob: form.object.public_send(field),
11
- accept: accept.map { |a| Mime[a].to_s }.join(',')
11
+ accept: accept.map { |a| Mime[a].to_s }.join(','),
12
+ direct_upload: direct_upload
12
13
  )
13
14
  end
14
15
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ImageInput
4
- VERSION = '0.0.4'
4
+ VERSION = '0.0.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image_input
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Katz