gitlab-org--gitlab-foss/app/models/import_export_upload.rb
James Lopez 07009a1f48
Add Object Storage to GitLab project import
- Refactor uploads manager
- Refactor importer, update import spec
- Add more object storage specs
2018-08-02 11:50:19 +02:00

16 lines
431 B
Ruby

# frozen_string_literal: true
class ImportExportUpload < ActiveRecord::Base
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