Skip to content
Snippets Groups Projects

Copy, don't move uploaded avatar files

Merged Jacob Vosmaer requested to merge jacobvosmaer-gitlab/gitlab-ce:project-avatar-fork into master
4 files
+ 32
4
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -10,4 +10,15 @@ def store_dir
@@ -10,4 +10,15 @@ def store_dir
def exists?
def exists?
model.avatar.file && model.avatar.file.exists?
model.avatar.file && model.avatar.file.exists?
end
end
 
 
# We set move_to_store and move_to_cache to 'false' to prevent stealing
 
# the avatar file from a project when forking it.
 
# https://gitlab.com/gitlab-org/gitlab-ce/issues/26158
 
def move_to_store
 
false
 
end
 
 
def move_to_cache
 
false
 
end
end
end
Loading