Re: [Rails] How to remove the orignal file in carrierwave

2012-10-17 Thread Colin Law
On 8 October 2012 09:42, Loganathan Sellapa wrote: > 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_ori

Re: [Rails] How to remove the orignal file in carrierwave

2012-10-17 Thread rubyonrailsx
How about File.unlink instead of File.delete -- rubyonrailsx Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Monday, October 8, 2012 at 4:42 PM, Loganathan Sellapa wrote: > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group

[Rails] How to remove the orignal file in carrierwave

2012-10-08 Thread Loganathan Sellapa
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+'/'