File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

uploading files in http

 
Dhandu Subrama
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1873
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
zip the doc and send it! :-)
thanks
maulin.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic