How to link a file reference to a user column via API (CODELESS)

Hello everyone! :wave:t2:

I’ve been trying to link a reference file to a user column for several days.
I tried with the block used to add relations, but without success.

Here is my practical example:
I have created a system of pages that allows the user to view his profile with the relative information (name, surname, profile picture, etc.) and to modify them, but once the image has been uploaded I do not know how to do it link to the user, I have already created a special column of type “File Reference” in the Users table.

Specifically, it should be an action that allows the user to view his profile picture on a page (for this I should be able once the file is linked in the appropriate column) and to modify it on another page.

Here are some screenshots.

Thanks everyone in advance for your help! :wink:
Marco

EDIT: In the profile page I know that I could have directly created a userObject and only made an API call, I have to modify it.


Hello @Marco_D_Alessandria :wave:t2:

under the hood, the File Reference column is just a String column, it behaves the same way, and it is actually a STRING type column. The only difference between File Reference and a String column is a visual representation in the Console, where it is allowed to pick some file from your Files browser or insert some external link.
So, in order to update the file reference column in a record, it is enough just to specify a new value of this column in the update (save) request. Just like if you change user name, for example.

Hope this helps.

Regards,
Stanislaw

Perfect! It worked, thanks!
Basically I integrated the operation with the API Service that I used to update the user information.

I thought it was a different type column, instead it’s just a string :sweat_smile:

Thanks Stanislaw,
Marco

1 Like