
Error uploading document: AppwriteException: document_invalid_structure, Invalid document structure: Unknown attribute: "id" (400)
The file is successfully uploaded but throwing the above error

cc: @Darshan Pandya

how are you uploading the file, maybe share a snippet as well?

is this reproducible via console as well?

Okay

final file = await _storage.createFile(
bucketId: _bucketId,
fileId: ID.unique(),
file: InputFile.fromBytes(
bytes: fileData,
filename: name,
contentType: 'application/octet-stream',
),
// permissions: [
// Permission.read(Role.any()),
// Permission.write(Role.any()),
// ],
);

code looks OK, what sdk version?

upload on console works fine so its not the API bug on Cloud.

are you making any database calls too? maybe somewhere else in parallel?

the internal id
s are always prefixed with $
.
Recommended threads
- Document Data is null.
I'm using flutter and I've just got everything set up, the document meta data is null but the actual query is fine. (see screenshot) The permission I have ar...
- Flutter native Google Sign Up with googl...
Hey I want to use the native login instead of the WebView. Do you have any experience on that and has Appwrite to plan this support?
- cli 5.0.5 command for pull and push of d...
Hi i am using selfhosted appwrite 1.5.10, for migration (duplicate project) purpose i am using cli 5.0.5, but i am unable to find commands for pull and push, wh...
