2018-07-25 05:30:33 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-03-28 09:17:42 -04:00
|
|
|
class ImportExportUpload < ApplicationRecord
|
2018-06-25 09:10:26 -04:00
|
|
|
include WithUploads
|
|
|
|
include ObjectStorage::BackgroundMove
|
|
|
|
|
|
|
|
belongs_to :project
|
2019-11-11 16:06:20 -05:00
|
|
|
belongs_to :group
|
2018-06-25 09:10:26 -04:00
|
|
|
|
2018-07-26 06:55:21 -04:00
|
|
|
# These hold the project Import/Export archives (.tar.gz files)
|
2018-06-25 09:10:26 -04:00
|
|
|
mount_uploader :import_file, ImportExportUploader
|
|
|
|
mount_uploader :export_file, ImportExportUploader
|
|
|
|
|
|
|
|
def retrieve_upload(_identifier, paths)
|
|
|
|
Upload.find_by(model: self, path: paths)
|
|
|
|
end
|
|
|
|
end
|