Re: Unable to Download document of Correct Mimetype
The result seems to be expected as you are not passing the extension in the name. "name" input param maps to cm:name property. When you pass the name param, it will simply apply the input name as is to cm:name property.
This is default unless you implement a custom behavior which listens to node creation event and guess the mimetype + extension and append the extension in the name via custom code.
To verify the name property mapping, use the below url to get all the properties for the recently uploaded file based on its id (nodeRefId) returned in the upload response:
So in short, solution to your problem is that-> don't pass name parameter and system will automatically recognize the name of the file at the time of upload and map it to cm:name property. The cm:name will be same as the file name you are uploading. And since extension will be already present, download issue will go away.