mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 02:04:53 +08:00
FEATURE: new rake task to clean up uploads & thumbnails
This commit is contained in:
@ -8,9 +8,6 @@ module FileStore
|
||||
def store_optimized_image(file, optimized_image)
|
||||
end
|
||||
|
||||
def store_avatar(file, avatar, size)
|
||||
end
|
||||
|
||||
def remove_upload(upload)
|
||||
end
|
||||
|
||||
|
@ -14,11 +14,6 @@ module FileStore
|
||||
store_file(file, path)
|
||||
end
|
||||
|
||||
def store_avatar(file, avatar, size)
|
||||
path = get_path_for_avatar(file, avatar, size)
|
||||
store_file(file, path)
|
||||
end
|
||||
|
||||
def remove_upload(upload)
|
||||
remove_file(upload.url)
|
||||
end
|
||||
@ -80,10 +75,6 @@ module FileStore
|
||||
"#{relative_base_url}/_optimized/#{optimized_image.sha1[0..2]}/#{optimized_image.sha1[3..5]}/#{filename}"
|
||||
end
|
||||
|
||||
def get_path_for_avatar(file, avatar, size)
|
||||
relative_avatar_template(avatar).gsub("{size}", size.to_s)
|
||||
end
|
||||
|
||||
def relative_avatar_template(avatar)
|
||||
File.join(
|
||||
relative_base_url,
|
||||
|
@ -20,11 +20,6 @@ module FileStore
|
||||
store_file(file, path)
|
||||
end
|
||||
|
||||
def store_avatar(file, avatar, size)
|
||||
path = get_path_for_avatar(file, avatar, size)
|
||||
store_file(file, path)
|
||||
end
|
||||
|
||||
def remove_upload(upload)
|
||||
remove_file(upload.url)
|
||||
end
|
||||
|
Reference in New Issue
Block a user