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
- 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...
- [Bug] Appwrite Auth User Prefs
User prefs are decoded as blank although there are plenty of data and add preference button not working in this case