Topic: paperclip and file download

Hi all,

I am trying to add file attachment funtionality to my application, my requriement is a user should be able to upload any type of file ( xls, doc, zip etc) and later on by clicking on the attached file link should be able to download the file

1. I thought paperclip plugin will meet this requriment, but now I am not sure and seek your help
2. I was successfully able to install and configure the plugin

the issue I have is
1. How do we donwload a file that is been uploaded
2. how do I show just the name of the attachment instead of thumb nail etc

Please advise if I could do this with paperclip or some other plugin thank you

amit

Re: paperclip and file download

1. link_to "Download", model.whatever.url(:original, false)

2. model.attachment_file_name

Re: paperclip and file download

Thank you so much it works like a charm.. the only issue I have is that it opens the attachment in the browser itself rather then as txt file or xls file or pdf file .. could you advise bit on that how I can achieve the next level .. Thank you again for taking time out to reply to my questions.

Re: paperclip and file download

That's a content type / header problem with your http browser.

Re: paperclip and file download

Thanks i've been searching for this.

Re: paperclip and file download

Can I get a verification that the .url method is actually a paperclip object method?

I'm calling it on what I believe to be a paperclip object .. without any luck.

Re: paperclip and file download

Thanks Johnson I was searching for the same information. Your information help me.

Thanks

Re: paperclip and file download

I came across this through one of my friend but not experienced yet. There are several equipments available for accompanying the task perfect. The idea of yours seems to be extraordinary. By this system with less effort we can reach our destination.   I would like to have the detailed about the way to use these and any ways for downloading and other factors. Any help will highly appreciable.




Trackable QR codes
free QR code generator

Re: paperclip and file download

Johnson wrote:

1. link_to "Download", model.whatever.url(:original, false)

2. model.attachment_file_name


Thanks Johnson. My problem will resolved after your replying .


Phone Outfits

Re: paperclip and file download

Thanks i've been searching for this.

__________________________________________________
Runescape Gold|Rs Gold|Diablo 3 Gold

Re: paperclip and file download

Thanks! Helped me too!