2018-07-22 00:39:30 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-06-25 13:10:26 +00:00
|
|
|
class ImportExportUploader < AttachmentUploader
|
2021-10-19 12:12:07 +00:00
|
|
|
EXTENSION_ALLOWLIST = %w[tar.gz gz].freeze
|
2018-06-25 13:10:26 +00:00
|
|
|
|
2020-02-24 21:09:08 +00:00
|
|
|
def self.workhorse_local_upload_path
|
|
|
|
File.join(options.storage_path, 'uploads', TMP_UPLOAD_PATH)
|
|
|
|
end
|
|
|
|
|
2018-06-25 13:10:26 +00:00
|
|
|
def extension_whitelist
|
2021-10-19 12:12:07 +00:00
|
|
|
EXTENSION_ALLOWLIST
|
2018-06-25 13:10:26 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def move_to_cache
|
|
|
|
false
|
|
|
|
end
|
2020-04-08 21:09:50 +00:00
|
|
|
|
|
|
|
def work_dir
|
|
|
|
File.join(Settings.shared['path'], 'tmp', 'work')
|
|
|
|
end
|
|
|
|
|
|
|
|
def cache_dir
|
|
|
|
File.join(Settings.shared['path'], 'tmp', 'cache')
|
|
|
|
end
|
2018-06-25 13:10:26 +00:00
|
|
|
end
|