Upload Images to Storage from ext. URL

Options
Hi there,

I am using Xano Storage to upload base64 encoded image data, which works well.

Now I am struggling with a similar task: In my CRUD API I receive an image URL which is located on an external server (via external API). I need to upload (copy) that image from the external url to my own Xano space. 

Actually I couldnt find a way to do that. Any ideas about that?

Thank you,
Sönke

Comments

  • Lukasz Kwiatkowski
    Options
    I think if you are use input as file resource, then a function to add image meta data to this input (file resources) and then write it in your table as image it should work
  • Sönke Manaré
    Options
    Hey, thank you for the approach. Solved it like this: Created a custom function, added "file resource" as input type and added the function "create image from file". Input to that function is the file resource.

    In that way I was able to use my custom function directly in a separate API Logic flow. The custom function accepts both (external image url or base64 encoded data) as input. If I give an external url as input, the image from that url is copied to XANO storage. Love it ;)