|
|
|
@ -101,10 +101,20 @@ class ZipdownController < ApplicationController
|
|
|
|
|
|
|
|
|
|
Zip::File.open(zipfile_name, Zip::File::CREATE) do |zipfile|
|
|
|
|
|
input_filename.each do |filename|
|
|
|
|
|
flag = true
|
|
|
|
|
index = 1
|
|
|
|
|
rename_file = ic.iconv( (File.basename(filename)) ).to_s
|
|
|
|
|
rename_file = ic.iconv( filename_to_real( File.basename(filename))).to_s if is_attachment
|
|
|
|
|
|
|
|
|
|
zipfile.add(rename_file, filename)
|
|
|
|
|
begin
|
|
|
|
|
zipfile.add(rename_file, filename)
|
|
|
|
|
flag = false
|
|
|
|
|
rescue Exception => e
|
|
|
|
|
zipfile.get_output_stream('FILE_NOTICE.txt') do |os|
|
|
|
|
|
os.write l(:label_file_exist)
|
|
|
|
|
end
|
|
|
|
|
next
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
unless not_exist_file.empty?
|
|
|
|
|
zipfile.get_output_stream('FILE_LOST.txt') do |os|
|
|
|
|
|