mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:31:10 +08:00
added a job to clean up orphan uploads
This commit is contained in:
@ -16,11 +16,16 @@ class CookedPostProcessor
|
||||
end
|
||||
|
||||
def post_process
|
||||
clean_up_reverse_index
|
||||
post_process_attachments
|
||||
post_process_images
|
||||
post_process_oneboxes
|
||||
end
|
||||
|
||||
def clean_up_reverse_index
|
||||
PostUpload.delete_all(post_id: @post.id)
|
||||
end
|
||||
|
||||
def post_process_attachments
|
||||
attachments.each do |attachment|
|
||||
href = attachment['href']
|
||||
|
Reference in New Issue
Block a user