POST to Wordpress Media API

Hello,

I am having trouble Posting to the wordpress media API. I have managed to get it working via Postman by using a binary body and selecting the image off my desktop like the below:

But when i try via Retool i get a Bad Request error:

1 Like

Maybe try removing space from name? Also show us what it looks when you hover your mouse in that {{}} variable you got there in retool

I have tried with image.png and get the same response

1 Like

I suppose it need to be decoded any tip? @ScottR @PeteTheHeat @victoria

Hey, can anyone help with this?

Hey @RossJarv!

Happy to help here.

This user using the Wordpress API + Retool got unblocked after switching their body type from Binary to Raw. Not sure if it's the same issue you're facing, but could be worth a try!

https://community.retool.com/t/unable-to-call-api-invalid-content-disposition-specified/27185/8

Otherwise, have you been able to make any other successful Wordpress queries (e.g. a simple GET query to the Wordpress API) in Retool?

Is this issue solved? I am facing the same issue :-(. The upload is done to wordpress but the image for example is empty. Do I need to encode first?

Hi @LinoPino! Would you mind sharing a screenshot of your current query?

Hi @victoria ! Thank you for reaching out and help. My issue is resolved by using formData. Works like a charm :slight_smile: