Skip to content
Anees Kodappana edited this page Jan 1, 2019 · 3 revisions

MainActivity.java

private void imageUpload(final String imagePath) {

    SimpleMultiPartRequest request = new SimpleMultiPartRequest(Method.POST, apiUrl, mListener, mErrorListener);
    request.addFile("photo", imagePath);
    request.addMultipartParam("body", "text/plain", "some text");

    RequestQueue mRequestQueue = Volley.newRequestQueue(getApplicationContext());
    mRequestQueue.add(request);
    mRequestQueue.start();

}
Clone this wiki locally