Applying fix for #971 to develop branch
Properly split filename string passed to API into filename and API format (e.g. .json)
temporarily fixes the issue of uploading files with the .doc extension. Closes #966
Merge branch 'docFix' into develop