Skip to content
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

MultipartHttpServletRequest cannot handle multiple file inputs with same name-attribute [SPR-3964] #8644

Closed
spring-projects-issues opened this issue Oct 5, 2007 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Eirik Lygre opened SPR-3964 and commented

MultipartHttpServletRequest tracks and exploses uploaded files in a java.util.Map (through setMultipartFiles() and getFileMap()), with the key of the map being the name-attribute from the html-form. This means that files uploaded from the html-code will only ever show a single file, even though the user may have selected more than one:

...
<input type="file" name="attachment" />
<input type="file" name="attachment" />
<input type="file" name="attachment" />
...

I haven't found anything in the relevant standard (rfc1867 et al) that prohibits this, and indeed the underlying Jakarta Commons FileUpload infrastructure supports this through it's use of a List rather than a Map.


No further details from SPR-3964

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: web Issues in web modules (web, webmvc, webflux, websocket) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0 GA milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants