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
- Local Serverless Function Testing: Are D...
I have followed the instructions to get the CLI working, and have been able to log-in, initialize my project, and created a simple Python function, which calls ...
- Update user email using OTP
Hi, I am trying to implement email update using OTP, there is not password associated with the account. One solution I found online is creating appwrite functio...
- Magic Link token automatically consumed
Hi, I'm using the Magic Link auth system with Appwrite Cloud and I'm running into huge issues getting users to log in successfully. About 9 times out of 10, th...