Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-02 00:10:32 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-02 00:10:32 +0300
commit30dcba871f8cecf0bd672b7f3d20bb797c558822 (patch)
tree1216127c440bc00fb5f3a30d2d96c836f3460e19 /app/models/upload.rb
parent024e8b496d114c7c9adfce1736cea3c1eddc5979 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/upload.rb')
-rw-r--r--app/models/upload.rb11
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?