views:

23

answers:

0

When I send a file of size 624 B aprox. it is sent ok by HttpConnection. But when I send bigger file like > 624 B on the call target (PHP script) I don't get any POST parameters at all.

I use class HttpMultipartRequest: http://wiki.forum.nokia.com/index.php/HTTP_Post_multipart_file_upload_in_Java_ME

like this:

Hashtable params = new Hashtable();
params.put("title", t.getString());

HttpMultipartRequest req = new HttpMultipartRequest(
"http://domain.com/api.php",
params,
"upload_field", "original_filename.png", "image/png", imageArray);

byte[] response = req.send();
String sss= new String(response);

My cell phone is SE K770i.

Could you write how can I send file bigger than 624 B on J2ME app?