debian-mirror-gitlab/app/models/import_export_upload.rb

18 lines
450 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
2019-07-07 11:18:12 +05:30
class ImportExportUpload < ApplicationRecord
2018-11-08 19:23:39 +05:30
include WithUploads
include ObjectStorage::BackgroundMove
belongs_to :project
2019-12-26 22:10:19 +05:30
belongs_to :group
2018-11-08 19:23:39 +05:30
2018-11-18 11:00:15 +05:30
# These hold the project Import/Export archives (.tar.gz files)
2018-11-08 19:23:39 +05:30
mount_uploader :import_file, ImportExportUploader
mount_uploader :export_file, ImportExportUploader
def retrieve_upload(_identifier, paths)
Upload.find_by(model: self, path: paths)
end
end