Re: Handling File on Upload

David Kahn
2010-12-06T23:50:01Z

On Mon, Dec 6, 2010 at 3:59 PM, Walter Lee Davis
<waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:

>
> On Dec 6, 2010, at 4:01 PM, David Kahn wrote:
>
>  The only thing if I recall, that kept me from using paperclip for my
>> purposes, is the file essentially attached to the model but does not
allow
>> for modification and re-saving the file --- am I mistaken? Unless
things
>> have changed recently, it would be super-cool if Paperclip would handle
file
>> mods just as a mod to any attribute of the model... although I guess
this
>> gets away from the basic intent of Paperclip, which for what it does do
does
>> it very nicely.
>>
>
>
> You are mistaken, and although I came late to the Paperclip party, I
can''t
> recall a time when it was true. You can edit the model without modifying
the
> image (just don''t upload another image) and everything stays the
same in the
> image, or you can upload a new image and it will overwrite the previous
> version. It''s all managed when you save the model that the image
is attached
> to.
>

Right, but what I wanted was to be able to load a model instance, change the
file (say I encrypt a portion of the text) and have Paperclip update that
file on its own when I call model#save. I am pretty sure Paperclip does not
do this. Right, you can re-save the file but it requires manual action
beyond calling model#save.

>
> Walter
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.