Details
-
Task
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.3.3
-
None
Description
As of this writing, there is no possibility to have request specific customizations, or data.
This is mostly, because the user is typically interacting with the FileUploadBase object only, making seemingly simple issues, like the wish for a request speific value of fileSieMax ([Pull Request 22 on Githubhttps://github.com/apache/commons-fileupload/pull/22] unnecessarily complex.
As the current master provides an opportunity for API changes, we will:
1.) Split the FileItemIteratorImpl class, as well as its inner class FileItemStreamImpl out off the FileUploadBase class into separate objects.
2.) Defer initialization of the FileItemIteratorImpl class as long as possible, making the fields "multi", "notifier", and "boundary" non-final.
3.) Extend the FileItemIterator interface, and (in turn), the FileItemIteratorImpl object with methods like getFileSizeMax(), setFileSizeMax(long), etc.
4.) Change the API to enforce use of the FileItemIterator (and thus, the user noticing it's existence).
As a result we will have a greatly reduced FileUploadBase class, which is much better maintainable, than the current version.