Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-07-13 17:13:13 +0300
committerJames Lopez <james@jameslopez.es>2018-07-13 17:13:13 +0300
commit07ec2c7bd00e6d0487e3f81864af982ec73365b2 (patch)
tree97395261df8101c2f3455786ff8dcf3fbb482295 /lib
parent1263367c3fda134db41e115965c5134933dcb7c7 (diff)
use fileuploader dynamic path method in uploads manager and add spec
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/import_export/uploads_manager.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/gitlab/import_export/uploads_manager.rb b/lib/gitlab/import_export/uploads_manager.rb
index 52c41f7b3bd..db7c5e881c7 100644
--- a/lib/gitlab/import_export/uploads_manager.rb
+++ b/lib/gitlab/import_export/uploads_manager.rb
@@ -43,12 +43,7 @@ module Gitlab
private
def add_upload(upload)
- secret, identifier = upload.split('/').last(2)
-
- uploader_context = {
- secret: secret,
- identifier: identifier
- }
+ uploader_context = FileUploader.extract_dynamic_path(upload).named_captures.symbolize_keys
UploadService.new(@project, File.open(upload, 'r'), FileUploader, uploader_context).execute
end