diff options
Diffstat (limited to 'app/services/bulk_imports/file_download_service.rb')
-rw-r--r-- | app/services/bulk_imports/file_download_service.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/services/bulk_imports/file_download_service.rb b/app/services/bulk_imports/file_download_service.rb index 9a301c260a9..d08dc72e30b 100644 --- a/app/services/bulk_imports/file_download_service.rb +++ b/app/services/bulk_imports/file_download_service.rb @@ -7,8 +7,16 @@ module BulkImports REMOTE_FILENAME_PATTERN = %r{filename="(?<filename>[^"]+)"}.freeze FILENAME_SIZE_LIMIT = 255 # chars before the extension - - def initialize(configuration:, relative_url:, dir:, file_size_limit:, allowed_content_types:, filename: nil) + DEFAULT_FILE_SIZE_LIMIT = 5.gigabytes + DEFAULT_ALLOWED_CONTENT_TYPES = %w(application/gzip application/octet-stream).freeze + + def initialize( + configuration:, + relative_url:, + dir:, + file_size_limit: DEFAULT_FILE_SIZE_LIMIT, + allowed_content_types: DEFAULT_ALLOWED_CONTENT_TYPES, + filename: nil) @configuration = configuration @relative_url = relative_url @filename = filename |