How to send a multiple image in sd card android to web server? Two images or more?
This is my code
Bitmap bitmapOrg =BitmapFactory.decodeFile("/sdcard/Plant/pupuk/134681282302.jpg");
ByteArrayOutputStream bao = new ByteArrayOutputStream();
bitmapOrg.compress(Bitmap.CompressFormat.JPEG, 90, bao);
byte[] ba = bao.toByteArray();
String ba1 = Base64.encodeBytes(ba);
ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("image", ba1));
I only found the way to select a single image. I can’t send two or more image to web server.
Thanks for your attention. sorry for my bad english.
cheers
Alex
That would depend on what your server is expecting. If the code you posted works, you can simply iterate over it to send multiple images