mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-09 06:04:46 +08:00
Fix for file generation
This commit is contained in:
parent
ce9f1b1309
commit
0119533e75
1 changed files with 4 additions and 2 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue