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
- How can I get the Google Avatar of the u...
How can I get the Google Avatar of the user that signed in with Google?
- Function Go module undefined
Attached image, why module is undefine, also when I'm running `appwrite run function`, it still undefine, why?
- Unable to deploy site
I am on a new project where i want to deploy a new site, but what ever i'am trying - i get this error, and thats if i manually deploy with gz file 5.4kb or thro...