DEV: Pass the is_image flag when triggering the before_upload_creation event (PR #10031)

We would like to know if the file we’re going to upload it’s an image or not. I don’t want the event to be triggered inside the DistributedMutex since they are executed synchronously, and they could be slow.

GitHub