mack gille
2013-Jul-09 08:54 UTC
how to upload and download files (type of files pdfs,xls,word)
Hi, 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. Thankyou -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/24fc810686fd19391b17e597aea9b131%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
William Herry
2013-Jul-09 09:13 UTC
Re: how to upload and download files (type of files pdfs,xls,word)
On Tue, Jul 9, 2013 at 4:54 PM, mack gille <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi, > 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. > Thankyou > >You should look at Paperclip gem https://github.com/thoughtbot/paperclip It is very easy to use and allows to upload files.> >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAO1cLnygb_KH3yWE56MzzOgsuE83QUWMhHy7gs0-fu5N5UHhLg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Max
2013-Jul-09 22:13 UTC
Re: how to upload and download files (type of files pdfs,xls,word)
paperclip is a great way to upload the files. downloading the files shouldn''t be too difficult although the details can be specific to where you have your site deployed and how the file system is managed by the upload choices. on one site i have some static files that the users need to download. these are not uploaded content so i can just put them in /public/docs and create a link to them on the page. the browser just knows to download them when a user clicks on the links. from the sounds of it you''ll probably want to create a model entry for each file that is uploaded, upload them to AWS or something like that and make those links point to the AWS instance of the file. I imagine that would work. good luck, Max -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0d525cbe-0af8-4a5f-b8c2-2f3956771e69%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
mack gille
2013-Jul-10 08:46 UTC
Re: how to upload and download files (type of files pdfs, xls, word)
> Max@thanks max please can u suggest me any sample code. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d2b6f80fe621515f92470bf06b3b9168%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.