Content Upload is not generating URL/posting image

Options

Hi, I'm new to Xano, No Code, APIs, Endpoints, and most things tech…

I am trying to follow the Content Upload tutorial (), but when it comes to running the API for posting an image, it does not create a URL - see the attached preview below.https://docs.xano.com/working-with-data/functions/content-upload

So the image name comes up in the database, but not the image.

Can anyone help?

Best Answers

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

    I think you mean to reference the variable image rather than the input called image. The variable is a metadata object. The input is the file resource (from which you made the metadata object). Try changing the "image image" reference to the "var:" rather than the "input:" and I think you will get better results.

  • Lefteris - blupry.com
    Lefteris - blupry.com Member ✭✭
    Answer ✓
    Options

    Hello @GavinReid

    Thank you for sharing the screenshot. As I said above the issue is on the second function. The input is selected instead of the output from the first action. I understand that it is frustrating to select the right one so you could change the name of the output in the first function and then it will be more clear. Let me know if you still need help

  • arturosanz
    arturosanz Member ✭✭
    Answer ✓
    Options

    @GavinReid you need to be very careful when using the same name for variables and inputs because Xano defaults to inputs when you fill in the input fields. In the AddRecord function you assigned the image input to the image field, which is incorrect. On the contrary, you must assign the image variable to the image field. the image input is a resource file type but the image variable and the image field are both image type, which is different.

    Remember when you didn't understood well my 3rd step "add/edit the record assigning the result to the image field"? I meant the result of the second step, which is the image variable, not the image input.

Answers