开发者

how can i send Array of image files to php server

开发者 https://www.devze.com 2023-03-26 07:31 出处:网络
I make an application using APIs..In that i have to send array of image to php Api at a time..i don\'t want to use for loop to call url again and again..

I make an application using APIs..In that i have to send array of image to php Api at a time..i don't want to use for loop to call url again and again..

In my code i m using :

"file body" method to send an image from android app to php web-service. now i want to send multiple image at a time.

so i want to send that images in array form so i can开发者_运维技巧 send multiple image to php web-service link at a time. how can i send array of image using file body method or any other one.

this is my code

file = new File(AccountDetail._StrSelectImagePath);
cbFile = new FileBody(file, "image/jpeg");

in that _StrSelectImagePath is the path of the single image...


Why don't you want to use a loop? If you created a thread to send the file, you could spawn multiple threads to send multiple files, which could all run in the background at the same time.

I think this would be much simpler, especially if you already have working code in place to send an image.

-Woody

0

精彩评论

暂无评论...
验证码 换一张
取 消