Passing file resource parameter to function
Options
![Bertha Gabriela Nuñez Fernandez](https://us.v-cdn.net/6037124/user_avatars/1555127.jpg)
Bertha Gabriela Nuñez Fernandez
Member ✭
Hello, I think there is a problem passing a parameter type file resource.
I have a function that receives input a type file resource and two other fields, this function converts the file resource to metadata image and saves in the media table, and returns the url of the image.
Test the function directly in XANO and everything works fine, the file_content parameter I am passing in base64 encoded file format
[insert1.jpg][insert2.jpg]
I also have an api that receives the same resource file and other data, and calls the first function, passing the resource file, but when testing this it sends an error in the function call
[insert3.jpg][insert6.jpg]
Checking debug results, I realized that the file_resource parameter is not passing it in full, or passing other information
[insert4.jpg]
[insert5.jpg]Could you tell me if it's something I did wrong?
I have a function that receives input a type file resource and two other fields, this function converts the file resource to metadata image and saves in the media table, and returns the url of the image.
Test the function directly in XANO and everything works fine, the file_content parameter I am passing in base64 encoded file format
[insert1.jpg][insert2.jpg]
I also have an api that receives the same resource file and other data, and calls the first function, passing the resource file, but when testing this it sends an error in the function call
[insert3.jpg][insert6.jpg]
Checking debug results, I realized that the file_resource parameter is not passing it in full, or passing other information
[insert4.jpg]
[insert5.jpg]Could you tell me if it's something I did wrong?
Comments
-
There may be a bug when passing the file resource through to a custom function - we will take a look and let you know!
-
good catch!
We were able to fix this and squeeze this into this week's release.
Give it another try - it should work properly now.
https://docs.xano.com/release-notes -
Thanks, this is already solved
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