diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-02 00:10:32 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-02 00:10:32 +0300 |
commit | 30dcba871f8cecf0bd672b7f3d20bb797c558822 (patch) | |
tree | 1216127c440bc00fb5f3a30d2d96c836f3460e19 /app/models/upload.rb | |
parent | 024e8b496d114c7c9adfce1736cea3c1eddc5979 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/upload.rb')
-rw-r--r-- | app/models/upload.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/models/upload.rb b/app/models/upload.rb index c1a3df82457..ac7ebb31abc 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -2,6 +2,7 @@ class Upload < ApplicationRecord include Checksummable + # Upper limit for foreground checksum processing CHECKSUM_THRESHOLD = 100.megabytes @@ -51,9 +52,9 @@ class Upload < ApplicationRecord ## # FastDestroyAll concerns - def finalize_fast_destroy(keys) - keys.each do |store_class, paths| - store_class.new.delete_keys_async(paths) + def finalize_fast_destroy(items_to_remove) + items_to_remove.each do |store_class, keys| + store_class.new.delete_keys_async(keys) end end end @@ -65,6 +66,10 @@ class Upload < ApplicationRecord uploader_class.absolute_path(self) end + def relative_path + uploader_class.relative_path(self) + end + def calculate_checksum! self.checksum = nil return unless needs_checksum? |