2018-07-21 20:39:30 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-06-25 09:10:26 -04:00
|
|
|
class ImportExportUploader < AttachmentUploader
|
2018-07-26 06:55:21 -04:00
|
|
|
EXTENSION_WHITELIST = %w[tar.gz gz].freeze
|
2018-06-25 09:10:26 -04:00
|
|
|
|
2020-02-24 16:09:08 -05:00
|
|
|
def self.workhorse_local_upload_path
|
|
|
|
File.join(options.storage_path, 'uploads', TMP_UPLOAD_PATH)
|
|
|
|
end
|
|
|
|
|
2018-06-25 09:10:26 -04:00
|
|
|
def extension_whitelist
|
|
|
|
EXTENSION_WHITELIST
|
|
|
|
end
|
|
|
|
|
|
|
|
def move_to_cache
|
|
|
|
false
|
|
|
|
end
|
2020-04-08 17:09:50 -04: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 09:10:26 -04:00
|
|
|
end
|