aspose file tools*
The moose likes I/O and Streams and the fly likes uploading files in http Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "uploading files in http" Watch "uploading files in http" New topic
Author

uploading files in http

Dhandu Subrama
Greenhorn

Joined: Jan 28, 2003
Posts: 1
We are trying to upload doc (ms word document) or text files with and without graphics using servletinputstream. The upload is okay whereas when you view the uploaded file it looks garbled, whereas zips, pdf and ini files are okay.
-----------------------------7d319f4580644
Content-Disposition: form-data; name="FILE1"; filename="C:\Data\mydoc.doc" Content-Type: application/msword
��� � > �� ! # ���� ��������������������������������������������������
����������������������������������������������������������������������������������������������������
����������������������������������������������������������������������������������������������������
��������������������������������������������������
��������������������������������������������������
��������������������������������������������������
�������������������������������
Can someone sugguest a way to exporting the doc and text files without corrupting it. One of the reasons to used servletinputstream to accomadate very large size upto 1 to 2 GBytes.
Any help is appreciated,
thanks
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
hi,
zip the doc and send it! :-)
thanks
maulin.
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Are you viewing the uploaded file using Word, or some other program? The "text" you show looks a lot like you're viewing a valid Word document using a plain text viewer (like notepad or vi). That won't work. Your doc is probably fine; you just need the right viewer.


"I'm not back." - Bill Harding, Twister
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: uploading files in http