-
-
Notifications
You must be signed in to change notification settings - Fork 685
Return array of File Objects #400
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
Comments
Thanks! I always thought that is not so comfort too |
Maybe #315 is fix. |
Fields can also have multiples, is that a consideration here? |
@tunnckoCore - Can I submit a PR? |
Hi! This is a common request, so it's definitely good to add it. However, please be careful with the implementation. It's cumbersome and potentially dangerous to have a field that can be an object or an array. It requires the application to check every time, and the application may be tricked into mishandling files if an attacker submits 2 files when the app expects only 1. So don't reuse any existing fields. Add a new one, which is array-only. |
Just merged #380. We need to add |
|
Currently, formidable does not return an array of File Objects in the JSON format if only a single file upload takes place. This makes breaks the logic of counting the number of files.
Modified code which corrects this -
lib\incoming_form.js
The text was updated successfully, but these errors were encountered: