I wanna create a user profile dashboard in my web app. I've used Appwrite auth service but I want to help users to upload their photo in their profile route of the web application and also add other details.
Do I need to create a separate collection for it? Also, how to store the photo that will be uploaded by the user?
Hey you might want to checkout the user object from the docs
in prefs User's preferences can be storged as a key-value object
so you may use that according to your need
I recently discovered this useful project and also prefer you to look into this Project https://github.com/lohanidamodar/flutter_appwrite_starter/tree/main it has demontrated the exact use case what you are trying to do.
How to do that?
I'm using React.js in my application
So you can set a users profile pic using the prefs property of the user object as a json
I'm new to all these
It can be stored as a json say {"profile_pic": "YourImageUrl"}
where to store? how to do that?
Use the accountUpdatePrefs method to update the Prefs key-value json https://appwrite.io/docs/client/account?sdk=web-default#accountUpdatePrefs And then to fetch the same you can use accountGetPrefs method https://appwrite.io/docs/client/account?sdk=web-default#accountGetPrefs
Hope this helps, pls let me know if you are still facing any issue following this
If you want it to be publicly available, it's not possible to achieve that by default, unless using functions. In such case you will need a separate database with users data (probably more efficient than functions). Another way is grouping users in teams, that way you can get other users data
Recommended threads
- All My Project is Gone
Hello everyone, please help. Why have all my projects suddenly disappeared? I received a warning via email about one of my projects being paused. When I clicked...
- CORS errors in Obsidian custom plugin
Hi, anyone here familiar with obsidian community plugins? In short: it's a local first note app which supports writing your own add-ons / plugin But I keep get...
- > AppwriteException: The requested servi...
When trying to read or write from my database I get the following error: > AppwriteException: The requested service is disabled. You can enable the service from...