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|