diff options
| author | mo khan <mo@mokhan.ca> | 2015-05-22 14:13:06 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2015-05-22 14:13:06 -0600 |
| commit | 66e3fc00d7bacf0da2b18ef203b13ac1df5e4bd9 (patch) | |
| tree | 6ef52cd5ee61b9bcf79870e426383c78d4b1c3a1 /lib | |
| parent | 79729407a637c963cb88ba64929a932fa86db21d (diff) | |
parameterize the destination filename.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/temporary_storage.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/temporary_storage.rb b/lib/temporary_storage.rb index 5ce8db4..c1ddc10 100644 --- a/lib/temporary_storage.rb +++ b/lib/temporary_storage.rb @@ -1,6 +1,7 @@ class TemporaryStorage def store(file) - "#{tmp_dir}/#{file.original_filename}".tap do |new_path| + "#{tmp_dir}/#{file.original_filename.parameterize}".tap do |new_path| + Rails.logger.info("Copying... #{file.path} to #{new_path}") FileUtils.mv(file.path, new_path) end end |
