[Rails] How to remove the orignal file in carrierwave
HI All,
I am using the carrier wave gem for file uploading, and I am not able to delete the original file after uploading. I tried the below code but it didn't work, any help would be really appreciated.
after :store, :unlink_original
def unlink_original(file)
File.delete(store_dir+'/'+@original_file) #path of the original file
end
regards,
Loganathan
Mob: +91 7760780741 | +91 9944414388
Skype: loganathan.sellappa
ViewMe
--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home