I an using the latest parse android sdk 1.13.0 and a self hosted parse-server. I am getting the following error on file upload using android sdk-> com.parse.ParseRequest$ParseRequestException: bad json response or sometimes com.parse.ParseRequest$ParseRequestException: i/o failure
All other ParseObjects are working properly but not this. Please Help on this issue the full stack trace is below-> https://gist.github.com/ishaan1995/06a7c7abe83414ab4ceb.
my code->
final ParseFile file = new ParseFile(f);
file.saveInBackground(new SaveCallback() {
public void done(ParseException e) {
// Handle success or failure here ..
if (e == null) {
Toast.makeText(getApplicationContext(), "File Uploaded", Toast.LENGTH_SHORT).show();
Log.d("ishaan","uploadede url: "+file.getUrl());
} else {
Toast.makeText(getApplicationContext(), "Error: " + e.toString(), Toast.LENGTH_SHORT).show();
Log.d("ishaan-parse", "" + e.getMessage());
e.printStackTrace();
Log.d("ishaan-parse",""+e.getCode());
}
spinner.setVisibility(View.GONE);
}
}, new ProgressCallback() {
public void done(Integer percentDone) {
// Update your progress spinner here. percentDone will be between 0 and 100.
//spinner.incrementProgressBy(percentDone);
Log.d("perc", "Done:" + percentDone);
}
});
ParseObject files = new ParseObject("Files");
files.put("file_link", file);
//files.put("compr_data",compFile);
files.put("file_name",abc);
files.put("file_desc",desc);
files.saveInBackground();