mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 05:09:46 +08:00
DEV: Pass the for_export flag to the before_upload_creation event (#10599)
This commit is contained in:
parent
da918ac43e
commit
726bae8f0c
|
@ -128,7 +128,7 @@ class UploadCreator
|
||||||
add_metadata!
|
add_metadata!
|
||||||
return @upload unless @upload.save
|
return @upload unless @upload.save
|
||||||
|
|
||||||
DiscourseEvent.trigger(:before_upload_creation, @file, is_image)
|
DiscourseEvent.trigger(:before_upload_creation, @file, is_image, @opts[:for_export])
|
||||||
|
|
||||||
# store the file and update its url
|
# store the file and update its url
|
||||||
File.open(@file.path) do |f|
|
File.open(@file.path) do |f|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user