diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 18:38:24 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 18:38:24 +0000 |
commit | 983a0bba5d2a042c4a3bbb22432ec192c7501d82 (patch) | |
tree | b153cd387c14ba23bd5a07514c7c01fddf6a78a0 /app/uploaders | |
parent | a2bddee2cdb38673df0e004d5b32d9f77797de64 (diff) | |
download | gitlab-ce-983a0bba5d2a042c4a3bbb22432ec192c7501d82.tar.gz |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'app/uploaders')
-rw-r--r-- | app/uploaders/records_uploads.rb | 23 | ||||
-rw-r--r-- | app/uploaders/terraform/state_uploader.rb | 2 |
2 files changed, 2 insertions, 23 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` diff --git a/app/uploaders/terraform/state_uploader.rb b/app/uploaders/terraform/state_uploader.rb index 9c5ae8a8bdc..2306313fc82 100644 --- a/app/uploaders/terraform/state_uploader.rb +++ b/app/uploaders/terraform/state_uploader.rb @@ -12,7 +12,7 @@ module Terraform encrypt(key: :key) def filename - "#{model.id}.tfstate" + "#{model.uuid}.tfstate" end def store_dir |