Media type pdf not supported. Error because it's not outputting application/pdf on a pdf file

I’m getting a 400 error and media type pdf not supported. I successfully got 7 pdf downloaded from email outlook messages and the first 5 of them come down with mime type : application/pdf just fine but the mime type for the next couple are mime type: pdf and I’m not sure why. I can download them just fine, and they are coming from the outlook trigger the same way. Something isn’t making sense and I am wondering if someone can help me with this? The pdf’s are being outputting from the same software in the same way from the output.

</{
“nodes”: [
{
“parameters”: {
“inputDataFieldName”: “={{ $binary.keys().first()}}”,
“name”: “={{ $(‘Emails with attachements’).item.json.subject + “_” + $binary.values().first().fileName }}”,
“driveId”: {
“__rl”: true,
“value”: “My Drive”,
“mode”: “list”,
“cachedResultName”: “My Drive”,
“cachedResultUrl”: “https://drive.google.com/drive/my-drive”
},
“folderId”: {
“__rl”: true,
“value”: “1cBANJ7WEv1mNvb-7VmbGMdHY4qevuPyA”,
“mode”: “list”,
“cachedResultName”: “Upload_Quotes”,
“cachedResultUrl”: “https://drive.google.com/drive/folders/1cBANJ7WEv1mNvb-7VmbGMdHY4qevuPyA”
},
“options”: {}
},
“type”: “n8n-nodes-base.googleDrive”,
“typeVersion”: 3,
“position”: [
4720,
1296
],
“id”: “eacfc9ee-2851-44e1-b81d-9f96a16a11da”,
“name”: “Upload file1”,
“alwaysOutputData”: true,
“credentials”: {
“googleDriveOAuth2Api”: {
“id”: “nzSexlqRQJa37LXc”,
“name”: “Google Drive account”
}
}
}
],
“connections”: {},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “f9acaa05586e183c1474240cce45cd3544eba60b09b165a395e2118b16e97779”
}
}

I think special characters in the filename might be the problem here. I would suggest to try with the fileName only. If that works, you can try replacing special characters with this regex

{{ …item.json.subject.replaceAll(/[^a-zA-Z0-9]+/gi,‘_’) }}

I think the issue is with the Outlook get many messages and also the Outlook get message node. This works just fine when I use Gmail node of exact same type using the exact same files. And I’ve tried this back and forth with multiple pdf’s. It works in Gmail without any issue at all. It uploads from the email using Gmail exactly correct, every time.

Does anyone know if there is an issue with the Outlook node or have you experienced the same issue? As I mentioned, this works completely fine with the Gmail node but can’t seem to work correctly with the Outlook node. I’m sure there is a work around but if it’s the Outlook node, perhaps n8n could fix it to work the same with the proper file type being found as it does with the Gmail node.