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.
Summary
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
Rank 2: Process
Nov 8, 2023, 12:01
He are 2 photos. One original. Second uploaded and then downloaded
pitcairn1987
Rank 2: Process
Nov 8, 2023, 12:01
pitcairn1987
Rank 2: Process
Nov 13, 2023, 08:26
pitcairn1987
Rank 2: Process
Nov 13, 2023, 08:28
I'm sending photos like this in Flutter Web. In most cases it works. But sometimes photos are corrupted.
Drake
Nov 13, 2023, 19:17
what version of Appwrite and what Appwrite SDK version are you using?
pitcairn1987
Rank 2: Process
Nov 13, 2023, 20:34
Sdk 1.4.9, Appwrite 11.0.0
Drake
Nov 13, 2023, 20:43
Are you on Appwrite Cloud?
When you say it happens sometimes, is it sometimes for the same file?
pitcairn1987
Rank 2: Process
Nov 13, 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
Rank 2: Process
Nov 16, 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
Nov 17, 2023, 00:50
How big are these files that get corrupted?
pitcairn1987
Rank 2: Process
Nov 17, 2023, 13:15
pitcairn1987
Rank 2: Process
Nov 17, 2023, 13:16
Here is example
Drake
Nov 17, 2023, 21:22
Discord might scale stuff down. Would you please check on your end the size of the file before upload?
pitcairn1987
Rank 2: Process
Nov 18, 2023, 00:41
Drake
Nov 18, 2023, 00:42
It's gotta be related to how we chunk the data. Maybe an off by one error