You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Ruiz Cadenas, Jose I." <ru...@munimadrid.es> on 2004/10/27 12:24:34 UTC
[fileupload] MIME type or serialization problem
Hi:
I do file upload by a servlet using fileupload. I have no problem
with the upload process but... the uploaded file is different than the file
to upload. For example, the characters 90, 81, 9D, 8F (in hex) in a PDF
file
were changed in character 3F. Why? Have I specify the MIME type?
I don't use the write() method of FileItem, instead I'm using
BufferedWriter out = new BufferedWriter(new FileWriter(new
File(realPath)));
Is this correct?
TIA
nacho
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [fileupload] MIME type or serialization problem
Posted by Oliver Heger <he...@med.uni-marburg.de>.
I am no expert for [fileupload], but you should try an OutputStream
instead of a Writer. Writers perform character encoding for certain non
ASCII characters.
HTH Oliver
Ruiz Cadenas, Jose I. wrote:
> Hi:
>
> I do file upload by a servlet using fileupload. I have no problem
> with the upload process but... the uploaded file is different than the file
> to upload. For example, the characters 90, 81, 9D, 8F (in hex) in a PDF
> file
> were changed in character 3F. Why? Have I specify the MIME type?
>
> I don't use the write() method of FileItem, instead I'm using
>
> BufferedWriter out = new BufferedWriter(new FileWriter(new
> File(realPath)));
>
> Is this correct?
>
> TIA
>
> nacho
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
--
Dipl.-Inform. Oliver Heger
Zentrale Informationsverarbeitung (ZIV) / Bereich Anwenderverfahren
Klinikum der Philipps-Universität Marburg
Baldingerstraße 3,
D-35037 Marburg
Tel: +49 6421 28-66592
mailto:oliver.heger@med.uni-marburg.de
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org