Code example for FileEntity

0
            e.printStackTrace();
        } 
    } 
 
    public static void postImage(final Context context, final File image, AsyncHttpResponseHandler postEventResponseHandler) {
        FileEntity fileEntity = new FileEntity(image,"image/jpeg");
        params = new RequestParams();
 
        try { 
            params.put("image", image);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } 
//        params.put("album", IMGUR_CLIENT_SECRET); 
//        params.put("type", "refresh_token"); 
//        params.put("name", refresh); 
//        params.put("title", refresh); 
//        params.put("description", refresh); 
 
        ImgyRestClient.post(context, "image", params, postEventResponseHandler);
    }