Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

file upload using flex and jsp getting extra things...  RSS feed

Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am working on a application where I am using adobe flex. I have a requirement wher I have to upload file to the server. System allows user to browse file from local machine and flex uploads it to the server.

Now there is a upload url, its a jsp page which gets mutipart/form-data content from the request, opens an outputstream and writes the content of the inputstrem to the file.

Above jsp writes the content of browsed file to d:/naseem.txt

Problem which I am facing is besides the actual content, it also write something else.

Actual file:

My Text

upload txt file which I got:

Content-Disposition: form-data; name="Filename"

Content-Disposition: form-data; name="author=Author"; filename="test.txt"
Content-Type: application/octet-stream

My Text
Content-Disposition: form-data; name="Upload"

Submit Query

My question is how do I remove these content-disposition, content type i.e., extra things from my file. I need only content to be written in the file.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!