Fix for file generation

This commit is contained in:
Urban Rotnik 2019-10-22 11:02:59 +02:00
parent ce9f1b1309
commit 0119533e75

View file

@ -96,8 +96,10 @@ module TinyMceImages
else
# We need implement size and type checks here
new_image = URI.parse(image['src']).open
new_image_filename = asset.class.generate_unique_secure_token + '.jpg'
url = image['src']
image_type = FastImage.type(url).to_s
new_image = URI.parse(url).open
new_image_filename = Asset.generate_unique_secure_token + '.' + image_type
end
new_asset = TinyMceAsset.create(