summaryrefslogtreecommitdiff
path: root/lib/bulk_imports/common/extractors/ndjson_extractor.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bulk_imports/common/extractors/ndjson_extractor.rb')
-rw-r--r--lib/bulk_imports/common/extractors/ndjson_extractor.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bulk_imports/common/extractors/ndjson_extractor.rb b/lib/bulk_imports/common/extractors/ndjson_extractor.rb
index 79d626001a0..788d10ca364 100644
--- a/lib/bulk_imports/common/extractors/ndjson_extractor.rb
+++ b/lib/bulk_imports/common/extractors/ndjson_extractor.rb
@@ -7,6 +7,8 @@ module BulkImports
include Gitlab::ImportExport::CommandLineUtil
include Gitlab::Utils::StrongMemoize
+ FILE_SIZE_LIMIT = 5.gigabytes
+ ALLOWED_CONTENT_TYPES = %w(application/gzip application/octet-stream).freeze
EXPORT_DOWNLOAD_URL_PATH = "/%{resource}/%{full_path}/export_relations/download?relation=%{relation}"
def initialize(relation:)
@@ -39,7 +41,9 @@ module BulkImports
configuration: context.configuration,
relative_url: relative_resource_url(context),
dir: tmp_dir,
- filename: filename
+ filename: filename,
+ file_size_limit: FILE_SIZE_LIMIT,
+ allowed_content_types: ALLOWED_CONTENT_TYPES
)
end