Anybody succeed with uploading an image from appgyver?
Options
![Lukasz Kwiatkowski](https://us.v-cdn.net/6037124/user_avatars/2118965.jpg)
Lukasz Kwiatkowski
Member ✭
I am trying to use Xano "file resource" input and local path on the appgyver side (tried with image url as well) but I did not succeed by now...
local path looks like this but it does not seem to be compatible with what Xano expects as I am receving the error input is not properly formed
“file:///var/mobile/Containers/Data/Application/E42B1F52-6D94-4469-89F5-B15C502ECA15/tmp/30663633-E4EA-4B88-93DB-5E3F2BD484DC.jpg”
local path looks like this but it does not seem to be compatible with what Xano expects as I am receving the error input is not properly formed
“file:///var/mobile/Containers/Data/Application/E42B1F52-6D94-4469-89F5-B15C502ECA15/tmp/30663633-E4EA-4B88-93DB-5E3F2BD484DC.jpg”
Comments
-
would you be able to take a look here?
-
Here are the example errors and path values (below) I am trying to push as a file resources to Xano
[IMG_5519.PNG][IMG_5518.PNG] -
I'm able to upload an image from AppGyver using the base64 component to create the content of the post.
[image.png]
You also need to prepend a "data:image/jpg;base64," to the front using an AppGyver formulat
[image.png]
Check out this guy's tutorial:https://www.youtube.com/watch?v=YJoMbPAPqTo&ab_channel=SteveStava
-
indeed I found the answer in the video of Steve, thanks for helping.
If you guys want to give this tip in Xano documentation for file upload from local path (not sure if this is only for appgyver or generic way) , the flow is as follows:
• get output of image picker or take photo (local path)
• encode with base64
• concatenated the output with "data:image/png;base64," string (!!!) in app gyver it looks like this basically "data:image/png;base64," + outputs["Convert file to base64"].base64
• Pass the the entire above string to Xano file resource input
not sure what role this png plays in this string, probably it defines in what format a picture will be saved but it does not matter that local file is in jpeg for example -
Awesome!
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