summaryrefslogtreecommitdiff
path: root/app/models/import_export_upload.rb
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-06-25 15:10:26 +0200
committerJames Lopez <james@jameslopez.es>2018-07-06 15:46:18 +0200
commita2bf1641546a1d3eeb3e9f44734854f655c0adef (patch)
tree0652c20a92513330aa09c4a2ec9adbfaeb3a6494 /app/models/import_export_upload.rb
parentb0fa01fce3822da94aee6264829841996beb6df3 (diff)
downloadgitlab-ce-a2bf1641546a1d3eeb3e9f44734854f655c0adef.tar.gz
Update Import/Export to use object storage (based on aa feature flag)
Diffstat (limited to 'app/models/import_export_upload.rb')
-rw-r--r--app/models/import_export_upload.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/models/import_export_upload.rb b/app/models/import_export_upload.rb
new file mode 100644
index 00000000000..60d53d6c2c8
--- /dev/null
+++ b/app/models/import_export_upload.rb
@@ -0,0 +1,13 @@
+class ImportExportUpload < ActiveRecord::Base
+ include WithUploads
+ include ObjectStorage::BackgroundMove
+
+ belongs_to :project
+
+ mount_uploader :import_file, ImportExportUploader
+ mount_uploader :export_file, ImportExportUploader
+
+ def retrieve_upload(_identifier, paths)
+ Upload.find_by(model: self, path: paths)
+ end
+end