this working
TypeScript
File ff = File("path/vid.mp4");
await ff.writeAsBytes(bytes);
// Upload file to Storage
final fileUpload = await _storage.createFile(
bucketId: _storageFileBucketId,
fileId: ID.unique(),
file: InputFile.fromPath(
path: ff.path,
filename: file.name,
),
);
- but when i upload from bytes final fileUpload = await _storage.createFile( bucketId: _storageFileBucketId, fileId: ID.unique(), file: InputFile.fromBytes( bytes: bytes, filename: file.name, ), );
it's uploaded file but file not working (it's no same byte size) Byte Size: 31539436
when uploaded _storage.getFileDownload(bucketId: _storageFileBucketId, fileId: fileUpload.$id).then((ss) { print("Size: ${ss.length}"); // Size: 31539429 });
TL;DR
Issue: Uploading a file from bytes results in a file with a different byte size than the original.
Solution: When uploading a file from bytes, ensure the byte size remains the same by checking and adjusting the process accordingly.Recommended threads
- Realtime api and labels as permission
in my tables i set labels as permission and real-time capabilities stopped working. Before when i was having "any" role everything was working. Note: user have...
- how to access the value of account statu...
- What does it means
I am looking for Appwrite for migration, but i am confused with the term "Unlimited" in Pricing table of Documents . Kindly Let me know what does it ...