Avatar not updating automatically
Hello,
I'm trying to create a profile page for my mobile app and I want the user to be able to change their avatar.
In my storage, I have a default_avatar.jpg (images/avatars) that is copied with the user's UUID (avatars/$user_id) when a user creates an account and that loads automatically.
Then, I have a page that allows users to change their avatar and stores it in the same images/avatars folder with the name "user_id" (this replaces the old image).
My problem is that I can't get the image to load on my profile when it's uploaded to my storage instead of having to completely restart my simulator.
I've tried several things, including storing the image URL in a "profiles" table with the attribute "avatar_url," but to no avail...
Do you have a solution?
Thank you in advance.
I'm trying to create a profile page for my mobile app and I want the user to be able to change their avatar.
In my storage, I have a default_avatar.jpg (images/avatars) that is copied with the user's UUID (avatars/$user_id) when a user creates an account and that loads automatically.
Then, I have a page that allows users to change their avatar and stores it in the same images/avatars folder with the name "user_id" (this replaces the old image).
My problem is that I can't get the image to load on my profile when it's uploaded to my storage instead of having to completely restart my simulator.
I've tried several things, including storing the image URL in a "profiles" table with the attribute "avatar_url," but to no avail...
Do you have a solution?
Thank you in advance.