Remove old file when updating

26 views
Skip to first unread message

Alexandre

unread,
Feb 9, 2012, 7:26:15 PM2/9/12
to carrierwave
Hi,
I have seen that by default old files are removed when we upload a new
file, but in my case, it seems not working.
In my uploader file, I override filename with

def filename
"gif-#{Time.now.to_i}.gif" if original_filename
end

and the original_filename (file sent by the request) is always the
same.
The gif-xxxxx.gif are not removed, maybe it's not working like I
think.
Any idea ?
Thanks,

Alex
Reply all
Reply to author
Forward
0 new messages