Hello
I have a problem with using image upload API right now.
image/upload
I am working on iOS (Swift) platform and using pure URLSession.
As the Cat API Postman document says I get my http header correct.
But i have a problem with sending image data.
I expected Swift would convert image to data format anyways but it returns error response as following.
{
"message": "Invalid file data. Check you are sending the formdata.append('file', ...} format'",
"status": 400,
"level": "info"
}
So what i really wonder are
- I can choose data encoding types (utf-8, utf-16 … ascii, … etc) which one should it be?
- Is there any documents that describes Error messages that I am missing ?
I believe my code is ok.
Because I checked this API on postman and it gives 200 status code .
So I copied and pasted it on my iOS App but it does not work on my application .
Please let me know if more information needed.