19 lines
500 B
Ruby
19 lines
500 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ImportExportUpload < ApplicationRecord
|
|
include WithUploads
|
|
include ObjectStorage::BackgroundMove
|
|
|
|
MAXIMUM_IMPORT_FILE_SIZE = 50.megabytes.freeze
|
|
|
|
belongs_to :project
|
|
belongs_to :group
|
|
|
|
# These hold the project Import/Export archives (.tar.gz files)
|
|
mount_uploader :import_file, ImportExportUploader
|
|
mount_uploader :export_file, ImportExportUploader
|
|
|
|
def retrieve_upload(_identifier, paths)
|
|
Upload.find_by(model: self, path: paths)
|
|
end
|
|
end
|