mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 14:38:17 +08:00
DEV: Trigger an event before creating an upload
This commit is contained in:
parent
b8acb36532
commit
ac555610d9
|
@ -34,6 +34,8 @@ class UploadCreator
|
|||
return @upload
|
||||
end
|
||||
|
||||
DiscourseEvent.trigger(:before_upload_creation, @file)
|
||||
|
||||
DistributedMutex.synchronize("upload_#{user_id}_#{@filename}") do
|
||||
# test for image regardless of input
|
||||
@image_info = FastImage.new(@file) rescue nil
|
||||
|
|
Loading…
Reference in New Issue
Block a user