Oh you're using Appwrite cloud?
yes
Oh you don't need the set self signed then.
oh ok I'll remove that line of code
So the console log of the process.env.APPWRITE_ENDPOINT is "https://cloud.appwrite.io/v1"
The console log on the response of the newFilePermission inside getProductDocument function is: New Permission created { '$id': '64fbe41ede6fd6d2ecbb', bucketId: '64f9387bc57202784544', '$createdAt': '2023-09-09T03:18:55.369+00:00', '$updatedAt': '2023-09-09T04:50:44.468+00:00', '$permissions': [ 'read("user:64de92862ee341ef5a77")', 'update("user:64de92862ee341ef5a77")', 'delete("user:64de92862ee341ef5a77")' ], name: 'uwuuu.png', signature: '35d9be18d9c3d4510a126b62e2de85ef', mimeType: 'image/png', sizeOriginal: 1850419, chunksTotal: 1, chunksUploaded: 1 }
And it does change the $updatedAt variable.
Also the create documents and update does work, im currently testing it on my localhost, the only one that doesnt work is the one for updating the permissions of the file.
Also i console log the buyer and the ownerOfProduct, buyer="64fbde728881b69372bc", ownerOfProduct=" 64de92862ee341ef5a77"
Here on the appwrite cloud permissions of that file is still the same, theres only the creator permission that automatically creates with the file security, but still not the buyer permissions there
Can you update it here?
Did you make this change too?
yes
Do you mean if it lets me update from the cloud, like manually?
Yes
yes it does let me update from the cloud manually
what could be happening?
im baffled...it definitely is updating since updatedAt gets updated. and write operations work as create document and update document work.
you're using the node SDK, right? what version?
im using node-appwrite version 11.0.0
could it be that it is adding the permission to the user, but it does not show it in the cloud or in the console? or is that impossible?
It should show
Would you please use 8.1.0?
Ya I'm pretty sure this is the problem
it works
thank you very much Steven, but why does it not work in version 11.0.0?
11.0.0 is meant for Appwrite 1.4 where we added support for updating the file name. So, that parameter you were passing was name rather than permissions
oh i see, thanks
[SOLVED] Appwrite Updating File Error
Recommended threads
- Frequent 500 Internal Server Errors - Pr...
PROJECT ID: 6951f2xxxxx1ee9e750a REGION: Singapore (sgp.cloud.appwrite.io) PLAN: Pro Our production application experiences **500 Internal Server Errors** mult...
- Issue with Custom SMTP
Hey everyone, I'm facing an issue when updating my Custom SMTP settings on Appwrite Cloud. The UI fails silently (no visual errors), but when checking the cons...
- Function running for more than 2 hours i...
This is my projectID: 669fe01b003800dd0503 Cloud functionID is 696ea05400147eb8eb3b I hope this doesn't count against my GB-hours?