From 48fc7708f8981bdc9ef02fbc93ac041cfbd221c4 Mon Sep 17 00:00:00 2001 From: Miha Mencin Date: Mon, 25 Nov 2019 13:38:16 +0100 Subject: [PATCH] SCI-4109 fix the file copying --- app/models/team_zip_export.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/team_zip_export.rb b/app/models/team_zip_export.rb index 96c8b64e2..c31f59b8f 100644 --- a/app/models/team_zip_export.rb +++ b/app/models/team_zip_export.rb @@ -269,7 +269,9 @@ class TeamZipExport < ZipExport # Save all attachments (it doesn't work directly in callback function assets.each do |asset, asset_path| - asset.file.copy_to_local_file(:original, asset_path) + asset.file.open do |file| + FileUtils.cp(file.path, asset_path) + end end csv_file_path