Version of google-api-java-client 1.15.0-rc
Java environment Java 6, Android 2.3
The code :
UrlEncodedContent urlEncodedContent = new UrlEncodedContent(params);
FileContent fileContent = new FileContent("application/octet-tream", new File("/mnt/sdcard/images.jpg"));
MultipartContent multipartContent = new MultipartContent();
multipartContent.addPart(new Part(urlEncodedContent));
multipartContent.addPart(new Part(fileContent));
when I use
AndroidHttp.newCompatibleTransport().createRequestFactory().buildPostRequest(new
GenericUrl("url"), multipartContent).execute();
the web server can not receive the params and files .
MultipartContent output :
--__END_OF_PART__
Content-Length: 17
Content-Type: application/x-www-form-urlencoded; charset=UTF-8;
content-disposition=ee
content-transfer-encoding: binary
a=b&aa=bb&aaa=bbb
--__END_OF_PART__
Content-Length: 4
Content-Type: application/octet-stream
content-transfer-encoding: binary
cccc
--__END_OF_PART__--
After check, I found that different from web form submission .
Who can help me to solve this problem? Thank you ~
Original issue reported on code.google.com by zhongwe...@gmail.com on 24 May 2013 at 3:57
Original issue reported on code.google.com by
zhongwe...@gmail.com
on 24 May 2013 at 3:57