How to ensure file upload works with video using loopj AndroidAsyncHttp?


I am trying to upload a video file to my server from my android app using loopj AndroidAsyncHttp library. Uploading an image gives a "Success: 200" response whereas attempting to upload a video give either a 500 or 302 error response. This is my upload method:

private void uploadVideoTwo(String filePath){
AsyncHttpClient client = new AsyncHttpClient();
File myFile = new File(filePath);   RequestParams params = new RequestParams();   try {   params.put("file" myFile);   } catch (FileNotFoundException e) {   Log.e(TAG "Params Exception: " + e.getMessage());   }