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 ids are always prefixed with $.
Recommended threads
- Sudden CORS Errors - Domain hasn't Chang...
I have an Appwrite project with two web apps configured, the first one has the hostname `*` and the second one I just added to test if it could fix the issue wi...
- Any way to temporarily bypass the email ...
Hey guys, any way to bypass the email verification to use the accounts again? i need to recover some projects that due to recent changes have been stopped, and ...
- Create a new paid tier
Current pricing seems reasonable enough about what is someone getting for 25$. But for some people most of these resouces are getting wasted. Like the bandwidt...