# Update user Avatar

**URL:** <https://forum.social.plus/t/update-user-avatar/827>\
**Category:** General\
**Created:** [July 18, 2023, 2:23pm UTC](https://forum.social.plus/t/update-user-avatar/827 "2023-07-18T14:23:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![meridork](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@meridork](https://forum.social.plus/u/meridork)\
**Post date:** [July 18, 2023, 2:23pm UTC](https://forum.social.plus/t/update-user-avatar/827/1 "2023-07-18T14:23:30Z")

</div>

Hello,  
How can I update user profile photo?  
The photo located on FireStore and I send the path to the the following function.

```
AmityCoreClient.newFileRepository()
    .uploadImage(imageFile)
    .stream
    .listen((AmityUploadResult<AmityImage> amityResult) {
  amityResult.when(
    progress: (uploadInfo, cancelToken) {print('kobi - amity - uploadAvatar progress${uploadInfo.getProgressPercentage()}');},
    complete: (file) async {
      //proceed result with uploadedImage
      await updateUserAvatar(file.fileId);
      retCode = true;
    },
    error: (error) {
      retCode = false;
    },
    cancel: () {
      retCode = false;
    },
  );
});

```

**and have the error -**

I/flutter (27966): , exception: PathNotFoundException: Cannot retrieve length of file, path = ‘[https://firebasestorage.googleapis.com/v0/b/aller-17969.appspot.com/o/profileImage%2FopGhHNaUTKdvD7feBIFScl4iDDi1%2F8cc42aa0-215f-11ee-aeab-4d38f67d02b9?alt=media&token=ed552de3-351d-4ede-a599-f6157192198f](https://firebasestorage.googleapis.com/v0/b/aller-17969.appspot.com/o/profileImage%2FopGhHNaUTKdvD7feBIFScl4iDDi1%2F8cc42aa0-215f-11ee-aeab-4d38f67d02b9?alt=media&token=ed552de3-351d-4ede-a599-f6157192198f)’ (OS Error: No such file or directory, errno = 2), device: Android-220333QAG, version: --1020-1020-BaseDeviceInf

---

<div class="post-metadata">

**Author:** ![meridork](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@meridork](https://forum.social.plus/u/meridork)\
**Post date:** [July 18, 2023, 6:15pm UTC](https://forum.social.plus/t/update-user-avatar/827/2 "2023-07-18T18:15:09Z")

</div>

I downloaded the file to local directory on the mobile device,  
upload this file and its working OK.

Is is possible to upload the file from FireStore?

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [July 18, 2023, 7:18pm UTC](https://forum.social.plus/t/update-user-avatar/827/3 "2023-07-18T19:18:14Z")

</div>

Hello, unfortunately, no. In this case, you’ll need to upload the file via our platform.

---

<div class="post-metadata">

**Author:** ![meridork](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@meridork](https://forum.social.plus/u/meridork)\
**Post date:** [July 18, 2023, 7:23pm UTC](https://forum.social.plus/t/update-user-avatar/827/4 "2023-07-18T19:23:14Z")

</div>

I upload via Amity platform  
but its working only when the uploaded file is in the mobile.  
I download the file from FireStore and than upload it.

When I trying to upload the file directly from FireStore its not working

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [July 19, 2023, 10:40am UTC](https://forum.social.plus/t/update-user-avatar/827/5 "2023-07-19T10:40:42Z")

</div>

Apologies if my explanation wasn’t clear, yes, you will have to download the file and then upload it via our platform.
