New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple files in POST #13
Comments
Hi, thanks for an issue. I need to check it manually. Could you please describe when file is empty? |
This package is being used in apitte. Here's my code of a controller and a form.
if sent without image, exception is thrown that cannot be caught in the controller. By empty file I meant empty field, thus no file being send. |
You be fixed. Could you please test it @Odoaker-Alaric ? |
I'll have to try it somewhere separately, the project I am working on uses
apitte/core, apitte/debug, apitte/middlewares and all require lower
versions of this library and I didn't manage to forceupdate
psr7-http-message to version 0.5, it always kicks it back to 0.3.
If it's the same code I suggested, it should be fine tho. Works for me in
my personal project.
2018-06-28 7:39 GMT+02:00 Milan Felix Šulc <notifications@github.com>:
… You be fixed. Could you please test it @Odoaker-Alaric
<https://github.com/Odoaker-Alaric> ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKYmGCjQN53tvit0jFNjlNKA1OfgGJyPks5uBGv2gaJpZM4U084n>
.
|
Yep, it will be in apitte v0.4. We will release v0.3 with some tiny improvements and then v0.4 will be with PHP 7.1 You can trick it with It should use dev-master branch and for the rest of the packages it looks like same old v0.3. |
Cool trick, so far so good. |
If you try to upload two files in POST and one is empty (in case of both being empty, the issue occurs as well, but I'm not sure now),
will throw exception
If you try to upload multiple files in POST as array (type='file[1]', type='file[2]'), it throws exception again because parameter array $files contains inner arrays.
intended or am I doing anything wrong?
for now I modified method of Contributte\Psr7\Psr7ServerRequest to accept recursive arrays and ignore empty files:
The text was updated successfully, but these errors were encountered: