# Struggling with upload file to Xano

**URL:** <https://community.weweb.io/t/struggling-with-upload-file-to-xano/835>\
**Category:** How do I?\
**Tags:** xano\
**Created:** [July 20, 2022, 6:26am UTC](https://community.weweb.io/t/struggling-with-upload-file-to-xano/835 "2022-07-20T06:26:34Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![patopt](https://avatars.discourse-cdn.com/v4/letter/p/97f17d/32.png) [@patopt](https://community.weweb.io/u/patopt)\
**Post date:** [December 8, 2022, 7:14pm UTC](https://community.weweb.io/t/struggling-with-upload-file-to-xano/835/21 "2022-12-08T19:14:25Z")

</div>

I’m also having problems with this, look also to be associated to Authentication.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/2/2322b7a7c09b05529083956439c25a63b4c31f1b.png)

The only other thing is I’d like to pass user\_id to associate the uploaded file as a profile photo, am I doing that correctly on line 6?

---

<div class="post-metadata">

**Author:** ![kevinwasie](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/kevinwasie/32/402_2.png) [@kevinwasie](https://community.weweb.io/u/kevinwasie)\
**Post date:** [December 8, 2022, 7:24pm UTC](https://community.weweb.io/t/struggling-with-upload-file-to-xano/835/22 "2022-12-08T19:24:10Z")

</div>

You are calling the string endpoint at line 6. You need the variable values.

interpolate them:

> <https://stackoverflow.com/questions/3304014/how-to-interpolate-variables-in-strings-in-javascript-without-concatenation>

or concatenate them  
[3 Ways to Concatenate Strings in JavaScript - Mastering JS](https://masteringjs.io/tutorials/fundamentals/string-concat#:~:text=The%20%2B%20Operator,used%20to%20concatenate%20two%20strings.&text=You%20can%20also%20use%20%2B%3D,for%20a%20%3D%20a%20%2B%20b%20.&text=If%20the%20left%20hand%20side,hand%20side%20to%20a%20string).

something like “…/upload/image/” + user + “/” id

---

<div class="post-metadata">

**Author:** ![patopt](https://avatars.discourse-cdn.com/v4/letter/p/97f17d/32.png) [@patopt](https://community.weweb.io/u/patopt)\
**Post date:** [December 8, 2022, 7:27pm UTC](https://community.weweb.io/t/struggling-with-upload-file-to-xano/835/23 "2022-12-08T19:27:06Z")

</div>

OK thanks, let me play around with that some. In terms of the authentication piece, does that look correct?

---

<div class="post-metadata">

**Author:** ![kevinwasie](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/kevinwasie/32/402_2.png) [@kevinwasie](https://community.weweb.io/u/kevinwasie)\
**Post date:** [December 8, 2022, 7:32pm UTC](https://community.weweb.io/t/struggling-with-upload-file-to-xano/835/24 "2022-12-08T19:32:38Z")

</div>

you dont need the trend-id

[Previous page](https://community.weweb.io/t/struggling-with-upload-file-to-xano/835.md?page=1)
