2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
class ImportExportUploader < AttachmentUploader
|
2021-12-11 22:18:48 +05:30
|
|
|
EXTENSION_ALLOWLIST = %w[tar.gz gz].freeze
|
2018-11-08 19:23:39 +05:30
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
def self.workhorse_local_upload_path
|
|
|
|
File.join(options.storage_path, 'uploads', TMP_UPLOAD_PATH)
|
|
|
|
end
|
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
def extension_whitelist
|
2021-12-11 22:18:48 +05:30
|
|
|
EXTENSION_ALLOWLIST
|
2018-11-08 19:23:39 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
def move_to_cache
|
|
|
|
false
|
|
|
|
end
|
2020-04-22 19:07:51 +05:30
|
|
|
|
|
|
|
def work_dir
|
|
|
|
File.join(Settings.shared['path'], 'tmp', 'work')
|
|
|
|
end
|
|
|
|
|
|
|
|
def cache_dir
|
|
|
|
File.join(Settings.shared['path'], 'tmp', 'cache')
|
|
|
|
end
|
2018-11-08 19:23:39 +05:30
|
|
|
end
|