summaryrefslogtreecommitdiff
path: root/app/uploaders
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-15 18:09:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-15 18:09:36 +0000
commit09093c1278f2b3347465bf5939fda215592f0d1f (patch)
tree07976e435f6c73de8faf7a4cc891ebcfacee62d1 /app/uploaders
parent0d83264a7a24b33de933437355c77a4fe47e5419 (diff)
downloadgitlab-ce-09093c1278f2b3347465bf5939fda215592f0d1f.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/uploaders')
-rw-r--r--app/uploaders/records_uploads.rb23
1 files changed, 1 insertions, 22 deletions
diff --git a/app/uploaders/records_uploads.rb b/app/uploaders/records_uploads.rb
index 427314a87bb..967fcdc704e 100644
--- a/app/uploaders/records_uploads.rb
+++ b/app/uploaders/records_uploads.rb
@@ -56,31 +56,10 @@ module RecordsUploads
size: file.size,
path: upload_path,
model: model,
- mount_point: mounted_as,
- store: initial_store
+ mount_point: mounted_as
)
end
- def initial_store
- if immediately_remote_stored?
- ::ObjectStorage::Store::REMOTE
- else
- ::ObjectStorage::Store::LOCAL
- end
- end
-
- def immediately_remote_stored?
- object_storage_available? && direct_upload_enabled?
- end
-
- def object_storage_available?
- self.class.ancestors.include?(ObjectStorage::Concern)
- end
-
- def direct_upload_enabled?
- self.class.object_store_enabled? && self.class.direct_upload_enabled?
- end
-
# Before removing an attachment, destroy any Upload records at the same path
#
# Called `before :remove`