OneDrive Node Error on File Upload

I just updated to v0.177.0 last night, and this morning I’m having issues using the OneDrive Node to upload files. It returns a 400 error stating this:

{"error":{"code":"BadRequest","message":"Entity only allows writes with a JSON Content-Type header.","innerError":{"date":"2022-05-20T12:31:35","request-id":"omitted","client-request-id":"omitted"}}}

I am able to create folders in OneDrive with this node, so it appears the node works for other actions. I tried re-running it a few different times and I get the same result. Prior to the upgrade I performed last night, this node action worked fine so I’m not sure if something changed with the OneDrive node. I’ve included screenshots of the error below:

Hey @jhambach,

What version were you on before and does the file name contain any special characters?

If memory serves, the notification said we were 4 versions behind so I’m guessing 0.173.0?

Here is the filename I’m trying to upload:


I have tried to reproduce it with no luck, The downside is the binary object I am using has a name set. I am not sure if yours does though. As a test could you run the workflow below, It will make a test folder, download a 1mb file then save it to Onedrive.

So that did work for me, which made me want to try it with part of my scenario. When I did it with a set file name, I still get the same error. I’m gonna do some more troubleshooting on my end to see.

1 Like

If you check the binary data you are sending does it have a filename set on that object?

1 Like

Hey @jon you figured out the issue! I checked my HTTP GET request and noticed that there was no name field set.
If I add a Move Binary Data node after the HTTP GET and move JSON to BINARY and specify a name, it works. So it appears that the file name isn’t getting populated whenever doing an HTTP GET request with response set to file? I’m guessing this is unintentional, so in the meantime I can use the Move Binary Data node unless there’s a way to specify the name in the HTTP node itself.

Side note, now that I think about this I do remember their being a filename in the HTTP GET request node under the Binary tab.

1 Like

Just tested again on the original workflow the issue occurred on and adding the Move Binary Data node fixes the problem