我是Rails上的ruby的新手。我能够提取单个zip文件,但如何提取多个zip文件。请帮助我
代码: d = user [:attachment] .tempfile
data3 = Dir.glob(d)
data1 = Dir.glob("**/*")
resume = Resume.new(resume_params)
resume.save
#d1='E://fs-api/destination_path/extract.zip'
if folderextension=='zip'
Zip::File.open(d) do |zipfile|
zipfile.each do |entry|
f_path=File.join("destination_path", entry.name)
FileUtils.mkdir_p(File.dirname(f_path))
zipfile.extract(entry, f_path) unless File.exist?(f_path)
extension=entry.name.split(".").last
puts "{entry.name}"
end
end