In my last app I\'m going to use Koush Ion library. It\'s so handy but i have a problem with uploading file to my rest server. note: My server response to success upload Pro
Searched pretty long for this and noticed that the important thing was to include POST in .load()
Ion.with(getBaseContext()).load("POST",url).uploadProgressHandler(new ProgressCallback()
{
@Override
public void onProgress(long uploaded, long total)
{
System.out.println("uploaded " + (int)uploaded + " Total: "+total);
}
}).setMultipartParameter("platform", "android").setMultipartFile("image", new File(getPath(selectedImage))).asString().setCallback(new FutureCallback()
{
@Override
public void onCompleted(Exception e, String result)
{
}
});