appwrite / sdk-for-web

[READ-ONLY] Official Appwrite Web SDK ๐Ÿงก
https://appwrite.io
BSD 3-Clause "New" or "Revised" License
271 stars 58 forks source link

๐Ÿ› Bug Report: Upload Progress not being reported #58

Closed mariusbolik closed 3 months ago

mariusbolik commented 1 year ago

๐Ÿ‘Ÿ Reproduction steps

    try {
      const upload = await storage.createFile('uploads', ID.unique(), file, [Permission.read(Role.any())], (uploadProgress) => {
        console.log('Progress', uploadProgress)
      });

      console.log("Upload completed", upload);
    } catch (error) {
      console.error("Error while uploading file: ", error);
    }
  };

๐Ÿ‘ Expected behavior

The console.log in the callback should be updated, so I can report the upload progress to the user.

๐Ÿ‘Ž Actual Behavior

Sadly, the callback isn't emitting any events. The file gets uploaded correctly.

๐ŸŽฒ Appwrite version

Cloud Beta

๐Ÿ’ป Operating system

MacOS

๐Ÿงฑ Your Environment

No response

๐Ÿ‘€ Have you spent some time to check if this issue has been raised before?

๐Ÿข Have you read the Code of Conduct?

stnguyen90 commented 11 months ago

@mariusbolik thanks for creating this issue! ๐Ÿ™ How big is the file you're uploading?

stnguyen90 commented 9 months ago

@mariusbolik would you please provide some more information. FYI, we'll need to close this due to inactivity soon.

stnguyen90 commented 3 months ago

The progress is only triggered if the file is over 5MB as the progress is updated per 5MB chunk.