[ 
https://issues.apache.org/jira/browse/FILEUPLOAD-355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary D. Gregory resolved FILEUPLOAD-355.
----------------------------------------
    Fix Version/s: 2.0.0
       Resolution: Fixed

> Update code example: Use IOUtils instead of Streams utils class
> ---------------------------------------------------------------
>
>                 Key: FILEUPLOAD-355
>                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-355
>             Project: Commons FileUpload
>          Issue Type: Wish
>    Affects Versions: 2.0.0-M2
>            Reporter: Ana
>            Priority: Major
>             Fix For: 2.0.0
>
>
> I'm trying to use the Streaming API in *commons-fileupload2-jakarta-serverl6 
> v 2.0.0-M2*  like [in this 
> example|https://commons.apache.org/proper/commons-fileupload/streaming.html]:]:
> {code:java}
> // Create a new file upload handler
> JakartaServletFileUpload upload = new JakartaServletFileUpload();
> // Parse the request
> upload.getItemIterator(request).forEachRemaining(item -> {
>     String name = item.getFieldName();
>     InputStream stream = item.getInputStream();
>     if (item.isFormField()) {
>         System.out.println("Form field " + name + " with value "
>             + Streams.asString(stream) + " detected.");
>     } else {
>         System.out.println("File field " + name + " with file name "
>             + item.getName() + " detected.");
>         // Process the input stream
>         ...
>     }
> }); {code}
> But the org.apache.commons.fileupload.util.Streams class cannot be found. It 
> doesn't seem to have been ported to v2. Are there any plans to add it to 
> future releases?
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to