Update user Avatar

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’ (OS Error: No such file or directory, errno = 2), device: Android-220333QAG, version: --1020-1020-BaseDeviceInf

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?

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

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

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