Hello, I’m struggling with creating a collection that would upload an image to a profile,
I have the Api url that uploads the image, I have the image saved in postman folder.
In body - form-data image is attached as Key- file, Value - photo.png
Headers I have copied the request headers from the request through console, what am I missing?
I have 3 different outcomes,
400 error, bad request
415 error png is not supported, but it is supported by our website.
socket hangs error - this is when i have an extra header from the request header.
there is also a weird error, in which i’d get that im missing “publicImage” as key for photo? if I change it to publicImage i get taht im missing the old key - file…and so if I add in the body 2 images, one file and one publicImage, id end up with error 415 not supported format…
This honestly will be difficult to troubleshoot over this blog format, but we will do our best .
To start, do you have any example that works with an API call? Such as a curl, or some other language where a call is written to upload the png to the server via an api call?
Also, is there any form of documentation that we can refer to for invoking this call?
It may be helpful to provide some screenshots of what you are setting up in Postman so we can see how the request is formatted.
Until then, I don’t have much to go off of to assist in how to upload the png. Much of it really depends on how fb service expects to receive the png.
Thank you for the reply, I’m currently doing it by manually uploading a picture to the website- to get an idea for what to have in postman collection, through console copying the Request headers data and at body form-data I have the picture attached with and also without (tried both) what I can get from Params.
I will try tomorrow again, as hopefully then I will also have access to the api documentation