I am in the process of evaluating fly dot io for a project that I am working on. So far I find it great but I was hit with an issue over the last few days that stumped me. I am making requests to OpenAPI to generate images in my fly.io hosted application that are then supposed to be saved on the application.
This works fine working locally but fails when deployed: I just realised now that OpenAI are blocking the request:
ERROR 409: Public access is not permitted on this storage.
I even get the above error when I do a wget from my container… images from other sources are fine. I have tried including various headers in the http request but that has no effect. I can hit the images fine from a browser or a wget from my local machine
This occurs no matter what geographic location my elixir app is deployed to…
I asked on the fly.io support forum and they think its most likely an issue on the OpenAI side… the 409 error actually looks like an issue on the azure side.
I also think this must be some filtering that is being done by the API based on the some parameter of the request that it doesnt like… any attempt to get an image file from the fly.io application fails, I cant even ping the host serving the image from the container. Ive no problem getting the file locally. The 409 error is really weird as its not even documented. Since I cant hit the server I cant really attempt what you suggest using the base 64 encoding cause I’m not even getting to the file.
@PaulBellow b64 encoding of the create request was indeed the way to go, thanks for your help
I was not aware that I could get the actual image back on the initial create request. Mango helped me understand this on his post here and I put in the steps I had to do to get the image to download on my phonenix framework app on his post: