Back

Listen on bucket change

  • 0
  • Self Hosted
  • Functions
  • General
  • Storage
rovolt.
4 Apr, 2024, 19:14

Hello, is there a way to call an appwrite function if a given storage bucket changed? Like if a file was added or removed to that bucket.

TL;DR
Developers wanted to trigger an appwrite function when a storage bucket changes, such as when a file is added or removed. The solution is to use the `events` function, where the bucket ID can be obtained from `req.body`.
rovolt.
4 Apr, 2024, 19:32

I found function events and it looks like it does what I want. But what I can't find in the docs yet, how to get the id of the bucket that was changed when the function is called.

rovolt.
4 Apr, 2024, 19:53

[SOLVED] I got it. The data is in the req.body.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more