aspose file tools*
The moose likes Servlets and the fly likes file upload using flex and jsp getting extra things... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "file upload using flex and jsp getting extra things..." Watch "file upload using flex and jsp getting extra things..." New topic
Author

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

Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
Hi,

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:


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

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

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

Submit Query
------------cH2ei4GI3ae0KM7cH2GI3ei4ae0cH2--



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.

Regards,
Naseem


Asking Smart Questions FAQ - How To Put Your Code In Code Tags
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: file upload using flex and jsp getting extra things...