Back

Appwrite storage uploads are delayed

  • 0
  • Databases
  • Flutter
  • Storage
  • Cloud
havoc
6 Mar, 2024, 16:59

OK. This has been bugging me for 8 hours now. In the Flutter web app I'm working on, the uploaded files are be not the current file, which I expect, but is actually the previous file. Here's how it goes:

  1. To test my "image checker," I select a file that's bigger than what's set up in my bucket. Let's call it pic1.
  2. I attempt to upload it, and since it's greater the max file size, I catch the error, bring up an error alert, and choose another image.
  3. The second image, pic2, is less than the max file size, so it's expected to upload OK. However, for some reason, the file that get's uploaded is still pic1, though the filename says it's pic2. So I get another "storage_invalid_file_size" error and proceed to pick a third file.
  4. Upon selecting pic3, file size doesn't matter. A call to storage.createFile pushes through, but the file that gets uploaded is pic2.
  5. And if I select another file, pic4, and upload it, it's pic3 that gets uploaded (or not, depending on the actual file size of pic3).

Any insights, please, before I tear my hair out. Thanks!

BTW, I'm using the form_builder_image_picker package to select the images.

TL;DR
Developers are experiencing delays in Appwrite storage uploads with files not matching the selected images. The issue arises with the Flutter web app when uploading files after errors and the wrong file gets uploaded. The developer is using the *form_builder_image_picker* package for image selection. Solution: This seems to be a caching issue. Try clearing cached images or data before selecting a new file. This can help ensure that the correct file is uploaded each time.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more