Paperclip - possible to modify file and load file content as string?

Wanted to see if anyone knows of a way - or the preferred way - to do
three tasks with Paperclip:

  1. Access the content of an uploaded file before save. I did find that
    following works before save, but is there a clearer way to do this:


  1. Access the content of a file after save while my AR model instance is
    still alive and/or when I load a record and need the file content. i.e.
    do I
    just need to manually read the file into my object from the Paperclip
    or is there a direct method in Paperclip to do this?

  2. (if #2 above is possible), is there a way I can modify the file
    and if so, does calling on the Paperclip enabled object
    after a
    change save the changes?

Paperclip seems to make everything easy but I can’t seem to find a
way to do these tasks. Maybe it was not really designed for what I am
to do but is gets me pretty far along.

Thanks in advance,


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs