I think you want File.open
instead of File.read
. The latter returns a raw string, which CarrierWave doesn't know how to store
.
uploader = CsvUploader.new
File.open(file_path) do |file|
something = uploader.store!(file)
end
uploader.retrieve_from_store!(self.file_name)
This could probably be clearer in the docs, but I confirmed it by checking the specs. Bummer that CarrierWave is failing silently here.