FIX: Trigger before upload event after saving and before uploading it to know the upload is valid. (PR #10269)

The only consumer of this event is the antivirus plugin. We need to make sure that the upload is valid (especially the filesize), before triggering the event and sending the file for scanning.

GitHub