passing data from another page
Options
![Pawel Magdanski](https://us.v-cdn.net/6037124/uploads/userpics/LHNYOT1GZ7AL/nLEHU316T8F65.jpg)
Pawel Magdanski
Member ✭✭✭
I'm creating an app where I can have events in which I can post a photo. My issue is that I'm getting form is failing and I'm not sure why.
The post is simple:
1. image
2. description
3. challenge_id (which should be passed from the event page - I'm not sure how to handle this)
[image.png]On front-end side I choose as a remote action to get challenge and go to the add form which should take acquire challenge_id
[image.png]
The post is simple:
1. image
2. description
3. challenge_id (which should be passed from the event page - I'm not sure how to handle this)
[image.png]On front-end side I choose as a remote action to get challenge and go to the add form which should take acquire challenge_id
[image.png]
Comments
-
Hi - for doing content upload you will want to use the file resource input, additionally you'll need to take that input and use the function Create Image Metadata before adding it to your database. You can see an example in our documentation and also a tutorial in there - https://docs.xano.com/working-with-data/functions/content-upload#example-upload-an-image
-
So in table my image should be image or file resource type?
[image.png] -
I changed my image type to file resource and now I can't change it back to image for some reason. Error - Illegal offset type in isset or empty. [image.png]In some tutorials on youtube there is a method with image and image_url variable, is that obsolete?
[image.png] -
in your table it should be image. there isn't a file resource schema type. File resource is the input type in your API endpoint that you want to use
-
- the file resource input can accept both an image file or an image URL
-
There is such a type in table:[image.png]Moreover as I mentioned below I can't change it back now to image type due to "Illegal offset type in isset or empty" error. I think it is some kind of a bug.
-
hm I don't think that's supposed to be exposed. Go ahead and delete the column and create a new one that is an image type
-
Ok request seems to work on Xano, but I have one last thing to ask.
How to test it on Bravo and bind it with front-end? It seems that I need to add it somehow to body, to be able to test and bind it.
[image.png] -
Add it to your JSON body and pass a test value image URL just like you would with the other parameters
-
I did and something is not right, it is working on Xano, but not in Bravo. As url input I've used url of image from get request which is already in my table
[image.png][image.png][image.png][image.png] -
can you check your request history to see what Bravo Studio is sending for that call?
-
[image.png]I made some new calls a minute ago, but they did not appear in history yet. This is an older one.
-
if the call is not in the history that means it was not made by Bravo - based on their error message maybe your request body had errors/wasn't formatted properly?
-
I'm pretty sure that the test data input is the issue. Are you sure that url is enough for file resource input?
shouldn't it be more complex like the result of request in xano?
[image.png] -
Can you please share your parameter and JSON set up from Bravo studio?
-
Sure.
[image.png][image.png][image.png] -
you input is named "content_image" but you are calling it "content" in bravo studio
-
Aw sorry, I copied body from old request, it was a middle of the night in Poland. Here is a correct one which does not worked either. I changed the name of the input from "content" to "content_image" at some point , because my record in xano has the same name and I was thinking that maybe it is causing some trouble.
[image.png]
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