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.

https://github.com/koush/ion/blob/master/ion/src/com/koushikdutta/ion/builder/multipartbodybuilder.java#l55


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -