Dont know how to send uploaded images from frontend to the backend or api

hey friends
I have a problem
I have a frontend with html, css and javascript that it is like the user can upload or take a picture and it should be sent to the api or backend with a prompt and then the resault will be sent to the frontend for showing

now i have created the backend code from openai documentations but the problem is that it gives one and single picture locally by getting the path of the picture not getting the uploaded one
and then it shows the resault in the terminal by printing it not showing it in the frontend

can you please help me to change my code? im jounior :frowning:

can you share your backend code? Also make sure while sharing your code you don’t expose your API Key.