Wappler Version : 7.4.2
Operating System : Win 11
Server Model: NodeJS
Database Type: MariaDB
Hosting Type: Dedicated Windows Server
Expected behavior
What do you think should happen?
Sending an image from a client side form ($POST) to ChatGPT API endpoint to allow it to be edited should result in correct info coming back
Actual behavior
What actually happens?
Error is thrown: 'Unsupported content type: 'application/multipart/form-data'. This API method only accepts 'multipart/form-data' requests, but you specified the header 'Content-Type: application/multipart/form-data'. Please try again with a supported content type
The problem is Wappler is prefixing application to the Content-Type header, this causes an API error with chatgpt endpoint https://api.openai.com/v1/images/edits
The endpoint expects: Content-Type: multipart/form-data but Wappler is sending Content-Type: application/multipart/form-data
How to reproduce
create an upload form to upload an image
set up an API to point the image to the chatgpt endpoint `https://api.openai.com/v1/images/edits`
Try to upload an image, error above is triggered for the reason stated
I can supply the full json file I’m using if you’d like to test it.
I’ll be checking on during the break so let me know if you need anything and I’ll get right back to you. All the best to you and Debi for the festivities, hope you both have a great time.