debian-mirror-gitlab/app/models/import_export_upload.rb
2019-05-18 00:54:41 +05:30

16 lines
430 B
Ruby

# frozen_string_literal: true
class ImportExportUpload < ApplicationRecord
include WithUploads
include ObjectStorage::BackgroundMove
belongs_to :project
# 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