Commit 0802ca29 by liyijie

use file_path_with_name

parent a3f93828
......@@ -54,8 +54,9 @@ module TalltyImportExport
file_path = File.join(Rails.root, 'public', 'export')
FileUtils.mkdir_p(file_path) unless Dir.exist?(file_path)
file_name = "#{Time.now.strftime('%Y%m%d%H%M%S')}#{@filename}.xlsx"
pack.serialize(File.join(file_path, file_name))
return "/export/#{file_name}"
file_path_with_name = File.join(file_path, file_name)
pack.serialize(file_path_with_name)
return file_path_with_name
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment