Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1018311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:50:21+00:00 2026-05-16T10:50:21+00:00

I need to allow multiple downloading of small documents in Rails, preferably using Paperclip

  • 0

I need to allow multiple downloading of small documents in Rails, preferably using Paperclip (I’ve already used it to enable uploading).

Specific needs:

  • Zip the files for download.
  • Download different file types together (.jpeg, .doc, docx, .pdf).

I have found lots of tutorials online for multiple uploading, but not for downloads. I appreciate your help. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:50:22+00:00Added an answer on May 16, 2026 at 10:50 am

    Define a download action on the controller that is supposed to handle the download. The method could look something like this: (Given a File model with a paperclip attachment called attached)

    def download
      require 'zip/zip'
      require 'zip/zipfilesystem'
      @files = File.all
    
      t = Tempfile.new('tmp-zip-' + request.remote_ip)
      Zip::ZipOutputStream.open(t.path) do |zos|
        @files.each do |file|
          zos.put_next_entry(file.attached_file_name)
          zos.print IO.read(file.attached.path)
        end
      end
    
      send_file t.path, :type => "application/zip", :filename => "Awesome.zip"
    
      t.close
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to allow multiple Products to be present in a Cart. I do
I need a regular expression that will not allow multiple special characters in a
I need to allow users to upload PDF documents that other users will read.
I am using a select menu which will allow multiple selections to be done.
I need a database that could be stored network drive and would allow multiple
In IIS 6, I need to allow multiple domains to come through to a
I need allow registered front end users to add, remove images to image gallery.
I need to allow users to select an assembly in much the same way
I need to allow a consultant to connect to SSIS on a SQL Server
I have a need to allow my users to execute .NET code that they

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.