Make sure the file has an extension, otherwise WordPress (server) can't match the mime type by using the filename provided in the request.