I am using this code to upload single image file on server.
But i need to upload multiple 'n' number of files at 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 to get MultipartBodyBuilder separately.
MultipartBodyBuilder body = Ion.with(MainActivity.this)
.load(Constant.UPLOAD_IMG);
body.setMultipartFile("UploadForm[imageFiles]", imgFile.getName(), imgFile);
.setMultipartFile()
? – Grosmark