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

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

diff --git a/lib/upload_creator.rb b/lib/upload_creator.rb
index b0e041a..991c315 100644
--- a/lib/upload_creator.rb
+++ b/lib/upload_creator.rb
@@ -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|

GitHub sha: 726bae8f

This commit appears in #10599 which was merged by romanrizzi.