diff options
author | ThibG <thib@sitedethib.com> | 2020-01-05 13:51:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-05 13:51:50 +0100 |
commit | bcfd6e3bb48f6e0eb88f7f3a650832842ab69166 (patch) | |
tree | 0e2bb7334c7954bee2962ed78565046e3b974725 /app/controllers/concerns | |
parent | 22daf24600d8e99e4569740ee5836d25c70c1e8b (diff) | |
parent | 83359fef2b04e81b35b047510ddb0c79bcf8ddaa (diff) |
Merge pull request #1259 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/concerns')
-rw-r--r-- | app/controllers/concerns/obfuscate_filename.rb | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/app/controllers/concerns/obfuscate_filename.rb b/app/controllers/concerns/obfuscate_filename.rb deleted file mode 100644 index 22736ec3a..000000000 --- a/app/controllers/concerns/obfuscate_filename.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -module ObfuscateFilename - extend ActiveSupport::Concern - - class_methods do - def obfuscate_filename(path) - before_action do - file = params.dig(*path) - next if file.nil? - - file.original_filename = SecureRandom.hex(8) + File.extname(file.original_filename) - end - end - end -end |