fix single file upload

When have many inputs of a single file, just the last input is uploaded.
Now the upload works with all inputs.