mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 01:44:34 +08:00
Fix eln export for file without extension
This commit is contained in:
parent
ec66ab8654
commit
0c5ce90895
1 changed files with 6 additions and 1 deletions
|
@ -130,7 +130,12 @@ class TinyMceAsset < ApplicationRecord
|
|||
if exists?
|
||||
order(:id).each do |tiny_mce_asset|
|
||||
asset_guid = get_guid(tiny_mce_asset.id)
|
||||
asset_file_name = "rte-#{asset_guid}.#{tiny_mce_asset.image.blob.filename.extension}"
|
||||
extension = tiny_mce_asset.image.blob.filename.extension
|
||||
asset_file_name = if extension.empty?
|
||||
"rte-#{asset_guid}"
|
||||
else
|
||||
"rte-#{asset_guid}.#{tiny_mce_asset.image.blob.filename.extension}"
|
||||
end
|
||||
ostream.put_next_entry("#{dir}/#{asset_file_name}")
|
||||
ostream.print(tiny_mce_asset.image.download)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue