top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

How to upload and download files (type of files pdfs,xls,word) when using Rails

0 votes

I need to upload files in my rails application.the type of the files should be pdf,xls,word.After that i need to download them from the view page.plz help me in this regard.

posted Jul 9, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

You should look at Paperclip gem It is very easy to use and allows to upload files.

answer Jul 9, 2013 by anonymous
Similar Questions
+1 vote

I upload a image by giving only the url of the item, where the exact image should be stored in the storage(eg. AWS S3 bucket) for the future process.

Please give your suggestions/ideas to develop my thing.

+1 vote

Does anybody know if there's anyway to upload a .xlsx file and then convert it to .xls file for later processing?

I'd like to use spreadsheet to write a new xls file but it doesn't support xlsx and the file is only importable with that format sadly. I saw roo but I don't know if there's a direct way to do it.

+1 vote

I was working on a test app and everything was going great. However now when I run "rails server" and none of the changes to the controller files are reflected.

If I make changes to HTML files, those are reflected. And yes, I'm sure am in the right directory editing the correct files.

I can get rid of actions in the controller files and it still works fine. Do I have to do something after I change the ruby files? I thought I could just save them then run 'rails server'... It had seemed to be working doing just that previously.

0 votes

I need to upload multiple image upload at a time in my application. I searched and got the carrierwave gem as a solution, but I find that only one image at a time.but i need to upload multiple images at a time using single the button uploadimage. How can I overcome this problem.

+1 vote

I need to use the model name 'Action' (which will not work in Rails 4.0.3) for business reasons (it's a product name). If I name the actual model something else, is there any way to (maybe with mod_rewrite) make the URL appear the way I need it to while keeping everything working in Rails?

I've tried using the controller flag in routes.rb to try to fix this, and it seems to work, but causes a lot of problems elsewhere -- basically anything where I use the automatic URLs, like

 link_to 'Link text', @instance_var

needs to be rewritten to use the long-hand route helper, like this

 link_to 'Link text', action_path(@instance_var)

What am I missing here?

Useful Links with Similar Problem
Contact Us
+91 9880187415
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.