How to download multiple files from S3 as Zip format in Rails 5.x.x app?
I am implementing feature which allows user to either download single file or multiple files from S3. Single file downloading is working properly, but for multiple files I am receiving error on Heroku, Errno::ENOENT (No such file or directory @ rb_file_s_lstat ) Controller code snippet for downloading files as zip format is as below, def method_name zipfile_name = "#{Rails.root}/public/archive.zip" Zip::File.open(zipfile_name, Zip::File::CREATE) do |zipfile | @transfer.transfer_attachments.each do |attachment | zipfile.add(attachment.avatar.file.filename, attachment.avatar.url) end end send