Back

[SOLVED] Photos corrupted

  • 0
  • Flutter
  • Storage
pitcairn1987
8 Nov, 2023, 11:59

Hi. In some cases photo seems to be corrupted when I upload it from my app. Details of the files are correct but I looks like this. It only happens when I upload it from my app ( by createFile method). Its ok when upload from Appwrite panel.

TL;DR
Issue: Photos are getting corrupted when uploaded from the app, but not when uploaded from the Appwrite panel. Solution: The issue might be related to the version of the Appwrite SDK being used. Try updating the Appwrite SDK to version 1.14.13 and the Appwrite version to 11.0.1. If the issue persists, it could be a bug, and you can test using the main branch of the SDK for Flutter on GitHub before the next release. Additionally, check the file size before uploading and ensure it is not being scaled down.
pitcairn1987
8 Nov, 2023, 12:01

He are 2 photos. One original. Second uploaded and then downloaded

pitcairn1987
8 Nov, 2023, 12:01
pitcairn1987
13 Nov, 2023, 08:26
pitcairn1987
13 Nov, 2023, 08:28

I'm sending photos like this in Flutter Web. In most cases it works. But sometimes photos are corrupted.

Drake
13 Nov, 2023, 19:17

what version of Appwrite and what Appwrite SDK version are you using?

pitcairn1987
13 Nov, 2023, 20:34

Sdk 1.4.9, Appwrite 11.0.0

Drake
13 Nov, 2023, 20:43

Are you on Appwrite Cloud?

When you say it happens sometimes, is it sometimes for the same file?

pitcairn1987
13 Nov, 2023, 22:07

no. the problem is repeatable for random files. It happens always for these files, but only on web. In Flutter Android i'm using InputFiles.fromPath in createFiles method and everything is fine. I'm not on Appwrite Cloud, only on my Vps

pitcairn1987
16 Nov, 2023, 08:39

@Steven Hi, Do You have any idea? Could it be some problem with Sdk version? I recently updated Sdk. But it strange that this error is not for all files..

Drake
17 Nov, 2023, 00:50

How big are these files that get corrupted?

pitcairn1987
17 Nov, 2023, 13:15
pitcairn1987
17 Nov, 2023, 13:16

Here is example

Drake
17 Nov, 2023, 21:22

Discord might scale stuff down. Would you please check on your end the size of the file before upload?

pitcairn1987
18 Nov, 2023, 00:41
Drake
18 Nov, 2023, 00:42

It's gotta be related to how we chunk the data. Maybe an off by one error

pitcairn1987
19 Nov, 2023, 13:56

sorry, could You explain briefly?

Drake
20 Nov, 2023, 19:25

Soo there might be a bug with. We're goign to make a release soon, but you could try using our main branch to test before we release: https://github.com/appwrite/sdk-for-flutter/tree/main

pitcairn1987
21 Nov, 2023, 08:45

Hi, I updated Appwrite to 11.0.1 and Sdk to 1.14.13. And it's working:)

Haimantika
21 Nov, 2023, 10:03

Thanks for the update. Will mark this as solved now.

Haimantika
21 Nov, 2023, 10:04

[SOLVED] Photos corrupted

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