API JSON for image uploads (Bravo to Xano)
Options
![Mach](https://us.v-cdn.net/6037124/user_avatars/3598414.jpg)
Mach
Member ✭
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.
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
-
First option of content upload. Works but cant pass it it Bravo
[content upload.png] -
Passes a wrong input error[Image_url.png]
-
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
-
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. -
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.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback