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