ruby on rails - Carrierwave or Paperclip: Keep image/file when updating other form fields -


when using either carrierwave or paperclip works expected exception of edit/update. when image or file exists record it's set nil on save if don't explicitly upload file.

what i've been looking for, haven't found, solution allows other form fields updated keeps existing file. unless, of course, file updated well.

my setup using nested models both carrierwave , paperclip i've tried following no success.

https://github.com/carrierwaveuploader/carrierwave/wiki/how-to%3a-keep-%28not-replace%29-files-on-nested-edits

apparently i'm missing can't life of me figure out what.

any appreciated.

i use paperclip nested_form , it's straight forward, no surprises.

did make sure check if nested record new record or existing? want display file_field if it's new record, otherwise display image (or file_field). that's link explained.

additionally post params sent on submit - check logs that.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -