Hi.
I would like to relate a picture to User, like profile picture.
Currently I’m using User entity for user profile and uploading the image to Files.
How can I relate a picture to User entity?
Hi.
I would like to relate a picture to User, like profile picture.
Currently I’m using User entity for user profile and uploading the image to Files.
How can I relate a picture to User entity?
Hi Vladimir,
How about adding a property to the user object? You could call it “picture” and the value would be the URL of the image.
Regards,
Mark
[reply user_id=1][h4]Mark Piller wrote:[/h4]Hi Vladimir,
How about adding a property to the user object? You could call it “picture” and the value would be the URL of the image.
Regards,
Mark[/reply]Thank you for a quick reply.
I thought about the same, BUT…the uploaded file has too long name to hold it in DB from perspective of frequent use (I would need frequently to retrieve this data).
The file name if following:
…files/download/userPics/B29470B9-A966-FEF3-FFD4-80233E3DBF00.png
But don’t you need the full URL anyway in order to load the file?
The full URL I can quickly to build in Java without bringing a full path from DB.
By documentation, the file url is
https://api.backendless.com//<version name>/files/<path>/<file name>
I have all below parameters, so I need just to attach <file_name> saved in User.picture column (for example)
Any other solution?
Yes, you can store just the <filename> part in the user object. Is there something that doesn’t seem right about it?