Gemini Generate Content fails: Drive PDF arrives as application/octet-stream
Status: Closed Β· Asked by FAST Restoration on Β· 0 views
Hello Igor,
Thanks for reaching out and for the detailed description.
This happens when the PDF downloaded from Google Drive is served with a Content-Type of application/octet-stream rather than application/pdf, which causes the Google AI Studio (Gemini) Upload File step to reject it with a 400 Unsupported MIME type error.
Here's the recommended pattern to resolve it:
1. Download the PDF and re-upload it to another hosting service that serves the file with the correct Content-Type: application/pdf header. Then use that new direct download URL in the Google Gemini Upload File action and test the workflow again.
2. If the issue persists, confirm whether the same PDF uploads and works successfully when uploaded directly through Google AI Studio.
3. If the MIME type is still detected incorrectly after that, please share the updated Task History ID along with the Upload File action's output so our team can review the request and response in detail.
Also make sure the file URL is directly and publicly accessible (no login, Cloudflare, or JavaScript challenge), as a protected URL can return an HTML verification page instead of the actual file bytes.
Please try the above and let us know how it goes.
Update with the test evidence requested. On a clone of the workflow, the Google AI Studio (Gemini) "Upload File" step succeeds: the file uploads and returns state ACTIVE, but its mimeType is recorded as application/octet-stream (file: Samuel Acosta Social Media Resume 2026 (3).pdf, 177291 bytes). The "Generate Content With Files" step then fails with 400 "Unsupported MIME type: application/octet-stream".
Two more things I tried on the clone: (1) setting the Generate step's mime_type field to application/pdf and re-testing - the same 400 error occurs, because the uploaded file itself carries the octet-stream type; (2) re-hosting the PDF through Pabbly's own File Uploader ("Upload File & Get URL") step and feeding that URL into the Upload File step - the file still arrives as application/octet-stream and Generate fails the same way.
These were step tests on the cloned workflow "CLONE - [Recruiter AI Assistant ]". Is there a way to make the Upload File step register the file as application/pdf, or is an external host that serves the correct content type the only route? I do not authorize account access, but I can share more step outputs here.
Update on account access: I authorize Pabbly Support to access my account to review this issue, including the workflows "Recruiter AI Assistant" and "CLONE - [Recruiter AI Assistant ]" and their task history. Please use whatever access you need to investigate the Gemini MIME type problem. Workflow link: https://connect.pabbly.com/v2/app/workflow/mapping/IjU3NjcwNTZiMDYzNjA0M2M1MjY0NTUzMTUxMzQi_pc. You are authorized to make edits to this cloned workflow if needed to resolve the issue.
Hello Igor,
The File Upload module from Pabbly Connect does not change or modify the type of file, it will remain the same. We recommend you to follow the steps mentioned in the first step by using a different hosting service.
