Anybody succeed with uploading an image from appgyver?

Options
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”

Comments

  • Lukasz Kwiatkowski
    Options
     would you be able to take a look here?
  • Lukasz Kwiatkowski
    Options
    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]
  • Sean T. Conrad
    Options
    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
  • Lukasz Kwiatkowski
    Options
      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
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    Awesome!