My code:
//bitmap to base64
bitmap.compress(Bitmap.CompressFormat.PNG, 90, stream);
byte[] byte_arr = stream.toByteArray();
imageEncoded[y] = Base64.encodeToString(byte_arr, Base64.DEFAULT);
//httppost
HttpClient client = new DefaultHttpClient();
HttpPost httppost = new HttpPost(url);
httppost.setEntity(new UrlEncodedFormEntity(params, "utf-8"));
HttpResponse r = client.execute(httppost);
HttpEntity httpEntity = r.getEntity();
Server code is a basic print_r($_POST) to view posted data.
Server response with base64 string post: Error 404: document not found
Server response normal without base64 string post.
I can view the page (ie. http://myserver.com/script.php) with no error in browser.
edit:
test here: http://bentabols.xyz/h2.php
try to upload with/without the base64 string.. without works
driving me crayz.. pls help
edit: added params
params.add(new BasicNameValuePair("postitem", "1"));
params.add(new BasicNameValuePair("name", "Item Name"));
params.add(new BasicNameValuePair("price", "232"));
params.add(new BasicNameValuePair("section", "forsale"));
params.add(new BasicNameValuePair("warranty", "nowarranty"));
params.add(new BasicNameValuePair("condition", "used"));
params.add(new BasicNameValuePair("province", "albay"));
params.add(new BasicNameValuePair("duration", "5"));
params.add(new BasicNameValuePair("category", "computers"));
params.add(new BasicNameValuePair("description", "desc"));
for (int p = 0; p < imagepaths.length; p++) {
params.add(new BasicNameValuePair("image_"+p, imageEncoded[p]));
params.add(new BasicNameValuePair("imgnames_"+p, imagenames[p]));
}