Skip to content
Back

How to trigger a function call after a bucket file create event?

  • 0
  • Functions
Mike
8 Mar, 2025, 02:26

Trying to trigger a python function when a new file is created in a bucket called 'recordings'. The most relevant option in the function settings is shown in the attached image. How can I specify which specific bucket would trigger the event?, something like this:

TypeScript
buckets[recordings].*.files.*.create

What does it mean that the event is triggered for 5MB chunks? My files are a few kilobytes each. I'd appreciate any clarification on these issues.

TL;DR
To trigger a function call after a bucket file create event, developers can edit the string in the Function settings and replace the first * with the bucket ID. The event triggers for each 5MB chunk if the file is larger than 5MB. If files are smaller, they will still trigger the function. More information can be found at <https://appwrite.io/docs/advanced/platform/events>.
Steven
8 Mar, 2025, 02:29
Steven
8 Mar, 2025, 02:30

And my files are a few kilobytes each. I don't understand the 5MB chunk threshold that would trigger the function. If the file is bigger than 5MB, the function will trigger for each 5MB chunk

Mike
8 Mar, 2025, 02:35

Thanks @Steven. The attached image comes from the same page. But I think I figured it out. It wasn't clear to me that I could edit the string in the Function settings and replace the first * with my bucket ID.

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