gems: update chunky_png
And pass it a proper IO object, to avoid "Undefined method `set_encoding`" errors.
This commit is contained in:
parent
b04afed20e
commit
aae452cc67
2 changed files with 2 additions and 2 deletions
|
@ -165,7 +165,7 @@ GEM
|
||||||
chartkick (3.4.0)
|
chartkick (3.4.0)
|
||||||
childprocess (3.0.0)
|
childprocess (3.0.0)
|
||||||
choice (0.2.0)
|
choice (0.2.0)
|
||||||
chunky_png (1.3.11)
|
chunky_png (1.4.0)
|
||||||
clamav-client (3.2.0)
|
clamav-client (3.2.0)
|
||||||
coderay (1.1.3)
|
coderay (1.1.3)
|
||||||
coercible (1.0.0)
|
coercible (1.0.0)
|
||||||
|
|
|
@ -60,7 +60,7 @@ module NewAdministrateur
|
||||||
|
|
||||||
def uninterlaced_png(uploaded_file)
|
def uninterlaced_png(uploaded_file)
|
||||||
if uploaded_file&.content_type == 'image/png'
|
if uploaded_file&.content_type == 'image/png'
|
||||||
chunky_img = ChunkyPNG::Image.from_io(uploaded_file)
|
chunky_img = ChunkyPNG::Image.from_io(uploaded_file.to_io)
|
||||||
chunky_img.save(uploaded_file.tempfile.to_path, interlace: false)
|
chunky_img.save(uploaded_file.tempfile.to_path, interlace: false)
|
||||||
uploaded_file.tempfile.reopen(uploaded_file.tempfile.to_path, 'rb')
|
uploaded_file.tempfile.reopen(uploaded_file.tempfile.to_path, 'rb')
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue