alexusmai/laravel-file-manager

FilesUploaded event is triggered even when uploading a file with an invalid format

Opened this issue · 0 comments

Description:
I have encountered an issue where the FilesUploaded event is still triggered even if an attempt is made to upload a file with an invalid format. Although the file is not uploaded, the event is incorrectly fired.

Steps to Reproduce:

Configure the package with specific allowed file formats in the config file.
Attempt to upload a file with an invalid format that is not allowed by the configuration.
Observe that the file is not uploaded, but the FilesUploaded event is triggered.

Expected Behavior:
The FilesUploaded event should only be triggered when a file is uploaded successfully with a valid format. If the file format is invalid and the upload fails, the event should not be triggered.

Environment:

Laravel Version: 10
Package Version: 3.0
PHP Version:8.2