Error 400 "Missing param: path" Error 500 "Missing var entry: model'

Hello,

I’m currently struggling with uploading photos to Xano database. I made a form container, put the File Upload element, and I always get error 400 ‘Missing Param: Path’. I tried this method File Upload | WeWeb documentation and I now get error 500 ‘Missing var entry: model’

Any help would me much appreciated, I spent good hours trying to find a fix, nothing seems to work…

Thanks in advance!

Solved the problem.

1 Like

Awesome! Well done!

Would you mind sharing the cause and solution for each error?

I’d love to know if you were uploading it to the WeWeb CDN and sending the URL to Xano in a text field or if you were trying to upload the file directly to Xano for example.

I’m guessing the latter if Xano returned an error saying the path parameter was missing. Is that right?

If you have any suggestions to improve the docs, I’d love to know.

In any case, we’re working on new file management features that should make this much easier in the future!

Sure, the problem was my fault. In short, the code you shared in this page File Upload | WeWeb documentation is correct, expect for the headers code, it return a syntax error. I had to modify the response in xano api and it worked, so be careful with little stuff like this

1 Like

But I get the same problem when trying to upload multiple files to Xano, I get:

“{“message”:“Jose\Component\Encryption\Serializer\CompactSerializer::unserialize(): Argument #1 ($input) must be of type string, array given, called in /xano/bin/includes/xano/context/JWE.php on line 107”}”

Any fix?

Solved it, search on google for “Upload image array - Xano” and you will find a video in the comments, also don’t forget to add the custom javascript before the request, but make sure you ask the AI to rewrite to code to return an array instead

2 Likes