Commit 63c7bc1

mo khan <mo@mokhan.ca>
2016-05-10 01:02:23
use copy instead of move to keep original file.
1 parent 74c26a2
Changed files (1)
lib/temporary_storage.rb
@@ -2,7 +2,7 @@ class TemporaryStorage
   def store(file)
     "#{tmp_dir}/#{File.basename(file.path).parameterize}".tap do |new_path|
       Rails.logger.debug("Copying... #{file.path} to #{new_path}")
-      FileUtils.mv(file.path, new_path)
+      FileUtils.cp(file.path, new_path)
     end
   end