Closed kwebble closed 7 years ago
Sorry for the late response.
I don't get this, i get the error messages if an upload fails. Below is a snapshot.
As an aside, what validator are you making use of ?
I'd like to clear this issue out as quick as possible as it seems to be the only reason i haven't pushed a new tag from the hot-fix
branch
You don't have to wait on me for tagging, perhaps I'm misunderstanding something.
And I already added some validation outside this component to handle the situation in my project.
I investigated some more and now think the problem is caused by #37. In that situation the result is an initial $fileInfo
based on an empty $file_path
.
@kwebble , you make use of a custom validator ? I wanted to ask if you were setting the error message after a failed validation (https://github.com/Gargron/fileupload/blob/master/src/FileUpload/Validator/MimeTypeValidator.php#L54-L56) but since you mentioned #37 is the case - the reporter also says the fix works- . Lemme push those changes.
I have done that already, you can test to make sure it works.. Tag version is 1.4.1
Tested and got an error message if validation fails, nice!
Awesome then
Since this is marked as fixed, i am closing this
I'm evaluating this component and would like to know how code should determine if an upload was skipped and get the error that the validator detected?
In the returned files array
error
anderrorCode
are always 0, even when a validator determined that an upload is invalid.I saw
FileUpload::process()
returns a newFile
instance. This object does not include the error detected during processing.