summaryrefslogtreecommitdiff
path: root/app/uploaders/file_uploader.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-18 13:16:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-18 13:16:36 +0000
commit311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch)
tree07e7870bca8aed6d61fdcc810731c50d2c40af47 /app/uploaders/file_uploader.rb
parent27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff)
downloadgitlab-ce-056d9df33865790d1b3c10f77912e00f61193000.tar.gz
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'app/uploaders/file_uploader.rb')
-rw-r--r--app/uploaders/file_uploader.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/uploaders/file_uploader.rb b/app/uploaders/file_uploader.rb
index 20aab58243a..bd959b14648 100644
--- a/app/uploaders/file_uploader.rb
+++ b/app/uploaders/file_uploader.rb
@@ -32,7 +32,14 @@ class FileUploader < GitlabUploader
def self.absolute_path(upload)
File.join(
- absolute_base_dir(upload.model),
+ root,
+ relative_path(upload)
+ )
+ end
+
+ def self.relative_path(upload)
+ File.join(
+ base_dir(upload.model),
upload.path # already contain the dynamic_segment, see #upload_path
)
end