API JSON for image uploads (Bravo to Xano)

Options
I'm struggling to set up the API to receive an image upload from an app.
All other POST requests work pretty well from the front end but I get a 500 error when working with image uploads. I'm using Bravo as the front end. 

The content upload in the Xano API is well set up and works in the backend, but I'm unable to pass the parameters from Bravo since i cant seem to locate the json field to bind the image request to.

Also creating an image_url field in the inputs that I pass to the image metadata variable in the function stack returns an error saying 'wrong input'

I must be missing something.

Comments

  • Mach
    Mach Member
    Options
    First option of content upload. Works but cant pass it it Bravo
    [content upload.png]
  • Mach
    Mach Member
    Options
    Passes a wrong input error[Image_url.png]
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
     you need to use the File Resource input type to upload an image URL, then use the Create Image Metadata function before adding it to the DB. Follow the tutorial and documentation here: https://docs.xano.com/working-with-data/functions/content-upload
  • Mach
    Mach Member
    Options
    Thanks Michael,
    I,ll give it another try.
    On Xano it worked well for me I just couldn't create the json body to pass the image post request to the front end (Bravo).

    I'll update once I'm done. 
    Thanks.
  • Mach
    Mach Member
    Options
    Hi  ,
    Could there be something I'm missing on passing the request body to Bravo for the image upload.
    I've set it up exactly as it is detailed in the documentation but the File Resource doesn't return the json body I can bind in Bravo (but works within the Xano debugger), while using image_url in input then passing the image metadata in a variable to the add record function gives back wrong input.