Open AviadKlein10 opened 7 years ago
My server side handle this. Thank you anyway And thank you for the great library!
@AviadKlein10 I am facing the same issue can you please tell me how did you resolved the issue?
If I remember the problem was that the server side and client side had different key for the parameters. Its importent to check this
Hey. I searched for hours and found nothing. I'm trying to send an image to my server using Node.js. But when trying to send using setMultipartParameter the server receive an empty request. This is the request:
public void sendImageByteArrayToServer(String userId, String imageIndexInArray, File imageFile) { Ion.with(context) .load("POST",serverIp + "/api/user/uploadImage") .uploadProgressBar(new ProgressBar(context)) .setMultipartParameter("userId",userId) .setMultipartParameter("imgOrder",imageIndexInArray) .setMultipartFile("imgFile", imageFile) .asJsonObject() .setCallback(new FutureCallback() {
@Override
public void onCompleted(Exception e, JsonObject result) {
Log.d("ImageResult", result +"");
Log.d("ImageException", e+"");
}
});
What am I doing wrong?
Thank you