How to convert this into a file

Options

Hello I’m using the clip drop api from stable diffusion and I’m getting an image returned in this format. I’ve been told this is Jfif format but any idea on how to convert this into a file resource and ultimately an image url.

Answers

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options

    Nice work wrangling SD into xano!

    this looks like a JPG. To save it, use content upload-make file resource from data and feed it this result. You can name it a filename at this point too (Eg image.jpg) Then you can content upload-make an image attachment to generate metadata structure from that file resource. Add that data structure to the appropriate image field in your table and you’re good to go.

  • Mq1989
    Mq1989 Member
    Options

    Ray! Thank you! This worked like magic!