Hi,
I am trying to receive a multipart entity at my http server and am having
trouble to parse it.
The request includes a header:
Content-Type: multipart/form-data;
boundary=-------------------------acebdf13572468
my code does the following:
BasicHttpEntity entity = (BasicHttpEntity)entityReq.getEntity();
long len = entity.getContentLength();
byte[] data = new byte[(int)len];
int read = entity.getContent().read(data, 0, (int)len);

and when I look at the the read bytes they hold:
includes a BasicHttpEntity and when I read it I see the content is:
---------------------------acebdf13572468
Content-Disposition: form-data; name="file";
filename="Data-Did_2013-03-03_06-05-15-6352000_Fid_114.plf"
Content-Type: application/octet-stream

‰

I actually need the bytes in the sent file.
Can someone send me a short code example on how to do it?
Regards,
Nir

Reply via email to