Correct return on uploading files

Changed to check for JSON