android - How to post multiple image files using ion library? -
i using code upload single image file on server.
but need upload multiple 'n' number of files @ once
ion.with(mainactivity.this) .load(constant.upload_img) .setmultipartfile("uploadform[imagefiles]", imgfile.getname(), imgfile) .asjsonobject() .setcallback(new futurecallback<jsonobject>() { @override public void oncompleted(exception e, jsonobject result) { } });
i tried multipartbodybuilder separately.
multipartbodybuilder body = ion.with(mainactivity.this) .load(constant.upload_img); body.setmultipartfile("uploadform[imagefiles]", imgfile.getname(), imgfile);
use addmultipartparts add list of filepart or stringparts.
Comments
Post a Comment