summaryrefslogtreecommitdiff
path: root/lib/gitlab/import_export
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-07-11 14:52:48 +0200
committerJames Lopez <james@jameslopez.es>2018-07-11 14:52:48 +0200
commit3c31de752027abfb247efc5c588496d329e5b47b (patch)
tree0489dff433ac3fd8f5b65d8e20fcb04a1c3e4238 /lib/gitlab/import_export
parent414939c97ce8a14e78d88db06f7378e98bea42a3 (diff)
downloadgitlab-ce-3c31de752027abfb247efc5c588496d329e5b47b.tar.gz
refactor uploads manager
Diffstat (limited to 'lib/gitlab/import_export')
-rw-r--r--lib/gitlab/import_export/uploads_manager.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/gitlab/import_export/uploads_manager.rb b/lib/gitlab/import_export/uploads_manager.rb
index c968deb6b19..b1ea7f19068 100644
--- a/lib/gitlab/import_export/uploads_manager.rb
+++ b/lib/gitlab/import_export/uploads_manager.rb
@@ -29,10 +29,15 @@ module Gitlab
Dir["#{uploads_export_path}/**/*"].each do |upload|
next if File.directory?(upload)
- UploadService.new(@project, File.open(upload, 'r'), FileUploader).execute
- end
+ secret, identifier = upload.split('/').last(2)
- true
+ uploader_context = {
+ secret: secret,
+ identifier: identifier
+ }
+
+ UploadService.new(@project, File.open(upload, 'r'), FileUploader, uploader_context).execute
+ end
rescue => e
@shared.error(e)
false