mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 06:56:54 +08:00
Skip missimg files in assets [SCI-2826]
This commit is contained in:
parent
990d3a34ca
commit
744ad5b196
1 changed files with 5 additions and 1 deletions
|
@ -166,7 +166,11 @@ class TeamZipExport < ZipExport
|
||||||
"_#{i}")}"
|
"_#{i}")}"
|
||||||
end
|
end
|
||||||
file = FileUtils.touch(name).first
|
file = FileUtils.touch(name).first
|
||||||
File.open(file, 'wb') { |f| f.write(asset.open.read) }
|
if asset.file.exists?
|
||||||
|
File.open(file, 'wb') do |f|
|
||||||
|
f.write(Paperclip.io_adapters.for(asset.file).read)
|
||||||
|
end
|
||||||
|
end
|
||||||
asset_indexes[asset.id] = name
|
asset_indexes[asset.id] = name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue