How to upload a binary to imgur?

I successfully uploaded a simple image using the HTTP request nodes and the example from this link: How to upload to imgur by URL?.

However, I’m having difficulty uploading a binary file. I can read the file, but I’m unsure how to structure the query using the n8n component. I’ve tried making a raw API call, and that works, but I’m confused about the different options available in the n8n HTTP request node. You can find the API documentation here: Imgur API.

Can someone guide me on how to submit a binary file to Imgur using n8n?

The linked topic seems to offer a solution. What is that you are struggling with exactly? Can you post your workflow with some data pinned using the </> button?

The solution offers a bit different configuration for HTTP Request node.
Did you try it?

yeah I did and I got a

{ "status": 400, "success": false, "data": { "error": "Bad Request", "request": "/3/image", "method": "POST" } }

either need to add query parameter manually or maybe body parameter like my url example

Try this. Although I do not have imgur acc to test it.

yeah that follow the url approach with the body parameter and I tried that but in your example you don’t pass the binary isn’t it ?
if you look at my working example with a simple url ideally I will want to replace the url by a binary

your test returns a 400

{ "status": 400, "success": false, "data": { "error": "Bad Request", "request": "/3/image", "method": "POST" } }

ok I found it.
The solution was to use n8n binary type body content…

thanks for your help @Olek !

2 Likes

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