• Post Reply Bookmark Topic Watch Topic
  • New Topic

File Upload Problems

 
Holger Prause
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am actually writing on a Servlet that takes an InputStream from the Browser and writes it to Disk.But i have some Problems doing it.
First of all i want to get to know what File is tranferred so that i can keep the Filename.
The other Problem is that in the tranferred File are some "additional Information" which are send from the Browser.I take the InputStream and write it to file.Should i use FilteredInputstream to avoid that , or is there another Solution ?
The following was send from the Browser
-----------------------------3307638341432713451104107888
Content-Disposition: form-data; name="File"; filename="testfile.txt"
Content-Type: text/plain
-----------------------------3307638341432713451104107888--
Some Code would be helpfull
Thx,
Holger
 
Carl Trusiak
Sheriff
Posts: 3341
 
Holger Prause
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you,
Yes it really helped ,i downloaded the MultipartRequest.java
file , and now everything is working fine :-)
Thank you very much
Bye,
Holger
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!