Just an FYI in case you come across the same thing.
I have found a bug that occurs when you try and send a file with the text of “Java” on the end of the file name.
If I send this filename I get the error you see below
https://legal.blah.com/blah/api/19/files/content?parentfolderid=44930&filename=Java.pdf
If send this, then it works just fine
https://legal.blah.com/blah/api/19/files/content?parentfolderid=44930&filename=Java2.pdf