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
- API Bandwidth Usage Not Updating
I’ve noticed that the API bandwidth usage in my project dashboard is not updating even after more than 24 hours have passed. Even after multiple API requests, t...
- creash when i try to use incrementRowCol...
https://github.com/appwrite/sdk-for-android/issues/97
- Recover archived project
Hello, I've come to understand that the free plan is only limited to 2 projects now. I have deleted all my projects to keep at 2. One of them are in archived pr...