Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
None
-
None
-
None
-
Operating System: other
Platform: Other
-
38623
Description
The current FileUpload API only allows uploaded data to be read by the
application if an intermediate buffer (i.e. DiskFileItem) is used. It
would be very handy if the low-level interfaces provided read access to
the uploaded file data.
Currently, the API provided by MultipartStream is in terms of an
OutputStream,
int readBodyData(OutputStream output)
I am proposing the addition of a method like,
InputStream readBodyData()
This allows the data to be processed as it's uploaded in the common case that
the API doing the processing is implemted in terms of an InputStream rather than
an OutputStream (e.g. unzipping, parsing XML, etc).
The use of a DiskFileItem (for instance) to get around the problem of stream
direction results in processing only commencing once the whole upload is
complete. For large uploads, this could well mean that the delay between
uploading completing and server-size processing completing will be so long that
(without additional hackery) the client will time-out waiting for the final
response.
Attachments
Attachments
Issue Links
- duplicates
-
FILEUPLOAD-112 Support for iterative parsing
- Closed