Add fix for data uri content length

This commit is contained in:
Stephen Sykes 2017-12-18 12:16:57 +02:00
parent 0cef2a777c
commit 32b5ba5c4b

View File

@ -388,7 +388,9 @@ class FastImage
def fetch_using_base64(uri)
data = uri.split(',')[1]
fetch_using_read StringIO.new(Base64.decode64(data))
decoded = Base64.decode64(data)
@content_length = decoded.size
fetch_using_read StringIO.new(decoded)
end
module StreamUtil # :nodoc: