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 8295557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:38:46+00:00 2026-06-08T14:38:46+00:00

I need my user to upload documents such ad pdf and txt on their

  • 0

I need my user to upload documents such ad pdf and txt on their profile. And I did that using Carrierwave, so I have a list of documents with titles and urls.

But how can I make other users download those files? Do I have to use a gem or is there something native I don’t even know since I am very new to rails?

Thanks

EDIT:

society.rb

class Society < ActiveRecord::Base
  ...
  has_many :documents, :dependent => :destroy
end

document.rb

class Document < ActiveRecord::Base
  belongs_to :society    
  mount_uploader :url, DocumentUploader    
end

And then this in the view I want to download files:

  <% @society.documents.each do |doc| %>
    <%= link_to "Download it", doc.url %>    //url is the column name of the saved url
  <% end %>
  • 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-06-08T14:38:56+00:00Added an answer on June 8, 2026 at 2:38 pm

    I don’t use Carrierwave but I guess it’s similar to Paperclip.

    Therefore you should be able to use something like this

     link_to 'Download file', user.file.url
    

    This is assuming you have a user instantiated object from a Model with a ‘file’ carrierwave attribute. Replace this with your attribute name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my site the user can upload two kind of files: documents (doc, pdf,
I have an upload form that will allow a user to upload a photo,
I have an application where I need the user to upload a photo. After
I have a Django app that lets a user upload a file and does
In our application, we allow user to upload documents which can be PDF, Doc,
I made a form that allows user to upload a file (text documents). I’m
I need the user to be able to upload multiple files to my server,
I need to upload the photo of a user with his details from asp.net
i have a text field in Contact screen and the user need to enter
I have a simple table view which is editable. All I need the user

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.