# Bug with Google Drive Node (Upload Function)

**URL:** <https://community.n8n.io/t/bug-with-google-drive-node-upload-function/21910>\
**Category:** Questions\
**Tags:** node, google-drive\
**Created:** [January 16, 2023, 10:49pm UTC](https://community.n8n.io/t/bug-with-google-drive-node-upload-function/21910 "2023-01-16T22:49:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![pb84](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@pb84](https://community.n8n.io/u/pb84)\
**Post date:** [January 16, 2023, 10:49pm UTC](https://community.n8n.io/t/bug-with-google-drive-node-upload-function/21910/1 "2023-01-16T22:49:38Z")

</div>

Google Drive doesn’t seem to work nicely uploading files anymore (this used to work fine for ages), coming up with the following error. In this case, a file has been converted from Google Docs (via the Google Drive node), downloaded as a PDF and then a reupload is attempted. Replace # with valid file ID’s to test (same with Google Drive parent folder, but can leave this blank if you wish).

## What is the error message (if any)?

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/a/c/ac167725d3b8bc8082ded9342503283e48bc0381.png)

"400 - “{\n "error": {\n "errors": [\n {\n "domain": "global",\n "reason": "invalidContentType",\n "message": "Invalid MIME type provided for the uploaded content.",\n "locationType": "other",\n "location": "media.mimeType"\n }\n],\n "code": 400,\n "message": "Invalid MIME type provided for the uploaded content."\n }\n}\n”

## Please share the workflow

## Share the output returned by the last node

See Error

## Information on your n8n setup

- **n8n version:** 0211.1
- **Database you’re using (default: SQLite):** SQLite
- **Running n8n with the execution process [own(default), main]:** own
- **Running n8n via [Docker, npm, n8n.cloud, desktop app]:** Docker

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [January 18, 2023, 1:57pm UTC](https://community.n8n.io/t/bug-with-google-drive-node-upload-function/21910/2 "2023-01-18T13:57:29Z")

</div>

Hi @pb84, I am very sorry you’re having trouble with this.

I just gave this a go on my end and the workflow executed fine using n8n@0.211.1 (after setting valid IDs of course):

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/f/4/f487e69314755def4754a1a343d97959c950b61f.png)

Can you confirm how you have configured your n8n instance (especially which value you have set for the `N8N_DEFAULT_BINARY_DATA_MODE` environment variable if any)?

And does the upload work for you when manually overriding the mime type, for example like so:

---

<div class="post-metadata">

**Author:** ![gfrts](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/gfrts/32/21329_2.png) [@gfrts](https://community.n8n.io/u/gfrts)\
**Post date:** [January 18, 2023, 9:10pm UTC](https://community.n8n.io/t/bug-with-google-drive-node-upload-function/21910/3 "2023-01-18T21:10:24Z")

</div>

@MutedJam I’ve been facing this same problem. From what I understand, the Google Drive node is no longer converting to the indicated file type (or it’s just not changing the MIME Type, I’m not sure).

See an image of a workflow that ran on 12/12/2022. Notice that the target file type of google slides is “To PDF”, and in the node’s output we can see the correct MIME Type (application/pdf).

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/2/5/2516a1f6e802f2bf6fb5fd29562de7406b14d00b.png)

In this other image, from today’s run, exactly on the same node of the same flow (where I haven’t made any changes since the date mentioned above), we see that the destination file type of google slides is “To PDF”, but in the output from node we can see that the file extension has not changed and the MIME Type has not changed either. Looks like a bug to me.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/f/b/fbb9c95320e6401ceafd5b3380f3840ea1e13149.png)

---

<div class="post-metadata">

**Author:** ![pb84](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@pb84](https://community.n8n.io/u/pb84)\
**Post date:** [January 18, 2023, 9:58pm UTC](https://community.n8n.io/t/bug-with-google-drive-node-upload-function/21910/4 "2023-01-18T21:58:34Z")

</div>

Tried your nodes and didn’t work unfortunately; same error. However the variation with the change of mime file via the code node fixed it.

No values set for `N8N_DEFAULT_BINARY_DATA_MODE`

I agree that this seems like a bug as didn’t have this issue before

---

<div class="post-metadata">

**Author:** ![TheFSilver](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/thefsilver/32/4791_2.png) [@TheFSilver](https://community.n8n.io/u/TheFSilver)\
**Post date:** [January 19, 2023, 4:46am UTC](https://community.n8n.io/t/bug-with-google-drive-node-upload-function/21910/5 "2023-01-19T04:46:55Z")

</div>

I can confirm I have the very same problem.  
This definitely need a fix even though the code node is doing the trick for now.

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [January 19, 2023, 7:12am UTC](https://community.n8n.io/t/bug-with-google-drive-node-upload-function/21910/6 "2023-01-19T07:12:31Z")

</div>

@netroy could this by any chance be related to your recent changes around binary data handling in n8n?

---

<div class="post-metadata">

**Author:** ![netroy](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/netroy/32/22154_2.png) [@netroy](https://community.n8n.io/u/netroy)\
**Post date:** [January 24, 2023, 11:01am UTC](https://community.n8n.io/t/bug-with-google-drive-node-upload-function/21910/7 "2023-01-24T11:01:33Z")

</div>

Yeah. looks like this broke due to [these](https://github.com/n8n-io/n8n/pull/5017/files#diff-436fbebcdf090c8e93e2c54c75d6f905322a5bf83913c5651f8807d88f3c217cR2377) changes.  
The [fix](https://github.com/n8n-io/n8n/pull/5240) is in review, and will most likely be included in the next release.

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [January 27, 2023, 4:20pm UTC](https://community.n8n.io/t/bug-with-google-drive-node-upload-function/21910/8 "2023-01-27T16:20:57Z")

</div>

Got released with `n8n@0.213.0`

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [February 3, 2023, 4:21pm UTC](https://community.n8n.io/t/bug-with-google-drive-node-upload-function/21910/9 "2023-02-03T16:21:55Z")

</div>

Closed on February 3, 2023, 4:21pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
