commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <mart...@apache.org>
Subject Re: [fileupload] File upload from Windows to Unix - need to remove carriage return
Date Mon, 03 Apr 2006 21:46:58 GMT
On 4/3/06, Natu, Ashlesha [IT] <ashlesha.natu@citigroup.com> wrote:
>
> Hi again,
>
> I am trying to upload a file (text or excel) from Windows to Unix. It gets
> uploaded fine but the file has carriage return charaters at the end of each
> line. How do I get rid of them? Due to this, my code is not able to read the
> file.


The file as uploaded by Commons FileUpload should be identical to the file
as it was on the original system that uploaded it. Commons FileUpload does
not manipulate the content in any way.

If you need to manipulate the content, you'll need to either use some other
package, or write some code to make the changes you need. However, you'll
need to be careful, since you'll need to be sure that a file is a text file
before trying to modify line ends, for example. Other formats, such as
Excel, will not be modified by FileUpload, and should not be modified by
your own code, either.

--
Martin Cooper


thanks & regards,
> AN
>
>
> -----Original Message-----
> From: Natu, Ashlesha [IT]
> Sent: Monday, April 03, 2006 11:15 AM
> To: Jakarta Commons Users List
> Subject: RE: [fileupload] Exception while using Jakarta Commons File
> upload
>
>
> Hi Sven,
>
> It worked. Thank you!
>
> regards, AN
>
>
> -----Original Message-----
> From: Sven Schliesing [mailto:sven@schliesing.de]
> Sent: Friday, March 31, 2006 3:53 PM
> To: Jakarta Commons Users List
> Subject: Re: [fileupload] Exception while using Jakarta Commons File
> upload
>
>
> Hi,
>
> you also have to include "IO" from Jakarte Commons to your classpath.
> The missing class
> "org/apache/commons/io/output/DeferredFileOutputStream" is in this
> package.
>
> You find the package here: http://jakarta.apache.org/commons/io/
>
> Greets,
>
> Sven
>
> PS: Please prefix your subject with [fileupload]
>
> Natu, Ashlesha [IT] wrote:
> > Hi all,
> >
> > I am new to Jakarta Commons File Upload. I downloaded the following jar
> file from the website:
> > commons-fileupload-1.1.jar
> >
> > I am trying to save an uploaded file to the server. Part of my code is:
> > if (FileUpload.isMultipartContent(request))
> >   {
> >    DiskFileUpload diskFileUpload = new DiskFileUpload();
> >    List fileItemsList = diskFileUpload.parseRequest(request);
> >
> >
> >      }
> >
> > When I run it, I get an exception :
> > Unexpected error condition thrown (java.lang.NoClassDefFoundError:
> org/apache/commons/io/output/DeferredFileOutputStream
> >
> > I added the following in the code:
> > import org.apache.commons.io.output.DeferredFileOutputStream;
> >
> > But then I get a compilation error:
> > package org.apache.commons.io.output does not exist
> >
> >
> > Is there any other jar that I have to include in the classpath? Please
> help...
> >
> >
> > thanks, AN
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message