diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-06-21 05:01:14 +0800 |
---|---|---|
committer | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-07-04 03:46:26 +0800 |
commit | 76b0518f334090294d4ad7db7be64846f6018e80 (patch) | |
tree | d2cd19c6f875dcefaadd37689beed49e837ef9bd /app/uploaders | |
parent | fb35a3b7f4250f683b6a234dd70d24aa38f229a6 (diff) | |
download | gitlab-ce-76b0518f334090294d4ad7db7be64846f6018e80.tar.gz |
Use #filename when generating upload URLs53357-fix-plus-in-upload-file-names
We don't need to find the filename from the remote URL
Diffstat (limited to 'app/uploaders')
-rw-r--r-- | app/uploaders/file_uploader.rb | 2 | ||||
-rw-r--r-- | app/uploaders/personal_file_uploader.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/uploaders/file_uploader.rb b/app/uploaders/file_uploader.rb index 1c7582533ad..b326b266017 100644 --- a/app/uploaders/file_uploader.rb +++ b/app/uploaders/file_uploader.rb @@ -203,6 +203,6 @@ class FileUploader < GitlabUploader end def secure_url - File.join('/uploads', @secret, file.filename) + File.join('/uploads', @secret, filename) end end diff --git a/app/uploaders/personal_file_uploader.rb b/app/uploaders/personal_file_uploader.rb index b43162f0935..1ac69601d18 100644 --- a/app/uploaders/personal_file_uploader.rb +++ b/app/uploaders/personal_file_uploader.rb @@ -93,6 +93,6 @@ class PersonalFileUploader < FileUploader end def secure_url - File.join('/', base_dir, secret, file.filename) + File.join('/', base_dir, secret, filename) end end |