import_export_upload.rb 431 Bytes
Newer Older
1 2
# frozen_string_literal: true

3 4 5 6 7 8
class ImportExportUpload < ActiveRecord::Base
  include WithUploads
  include ObjectStorage::BackgroundMove

  belongs_to :project

9
  # These hold the project Import/Export archives (.tar.gz files)
10 11 12 13 14 15 16
  mount_uploader :import_file, ImportExportUploader
  mount_uploader :export_file, ImportExportUploader

  def retrieve_upload(_identifier, paths)
    Upload.find_by(model: self, path: paths)
  end
end