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
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/group_import.rb')
-rw-r--r--lib/api/group_import.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/api/group_import.rb b/lib/api/group_import.rb
index ec51c2f44c3..afcbc24d3ce 100644
--- a/lib/api/group_import.rb
+++ b/lib/api/group_import.rb
@@ -2,8 +2,6 @@
module API
class GroupImport < Grape::API
- MAXIMUM_FILE_SIZE = 50.megabytes.freeze
-
helpers Helpers::FileUploadHelpers
helpers do
@@ -40,7 +38,10 @@ module API
status 200
content_type Gitlab::Workhorse::INTERNAL_API_CONTENT_TYPE
- ImportExportUploader.workhorse_authorize(has_length: false, maximum_size: MAXIMUM_FILE_SIZE)
+ ImportExportUploader.workhorse_authorize(
+ has_length: false,
+ maximum_size: Gitlab::CurrentSettings.max_import_size.megabytes
+ )
end
desc 'Create a new group import' do
@@ -69,7 +70,7 @@ module API
group = ::Groups::CreateService.new(current_user, group_params).execute
if group.persisted?
- GroupImportWorker.perform_async(current_user.id, group.id) # rubocop:disable CodeReuse/Worker
+ ::Groups::ImportExport::ImportService.new(group: group, user: current_user).async_execute
accepted!
else