2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-08-21 19:11:18 +08:00

DEV: Pass the for_export flag to the before_upload_creation event (#10599)

This commit is contained in:
Roman Rizzi 2020-09-04 17:24:40 -03:00 committed by GitHub
parent da918ac43e
commit 726bae8f0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -128,7 +128,7 @@ class UploadCreator
add_metadata!
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
File.open(@file.path) do |f|