
I am a developing an appwrite function locally. I am not sure how to add a trigger for bucket file creation events. I added in the appwrite.json into the events parameter
TypeScript
"functions": [
{
"$id": "67989f220010250ff712",
"name": "trancode video ",
"runtime": "python-3.9",
"specification": "s-0.5vcpu-512mb",
"execute": [
"any"
],
"events": ["buckets.*.files.*.create"],
"scopes": [
"users.read"
],
"schedule": "",
"timeout": 15,
"enabled": true,
"logging": true,
"entrypoint": "src/main.py",
"commands": "pip install -r requirements.txt",
"path": "functions/trancode video "
}
I upload the file in the bucket but the function does not seem to trigger.
I tried deploying the function by pushing it but getting the following error
TypeScript
appwrite push
? Which resources would you like to push? Functions (Deployment)
? Which functions would you like to push? trancode video (67989f220010250ff712)
ℹ Info: Validating functions ...
ℹ Info: Checking for changes ...
ℹ Info: Pushing functions ...
✗ Error • trancode video (67989f220010250ff712) • Invalid `specification` param: Specification must be one of:
✗ Error: No functions were pushed.
Unsure of what is wrong.
CLI version
TypeScript
appwrite --version
6.2.0
Appwrite deployment version
TypeScript
1.6.0
TL;DR
Developers are trying to trigger function events when developing locally. They added a trigger for bucket file creation events in appwrite.json but the function does not seem to trigger after uploading a file. When trying to deploy the function, they are facing an error related to the 'specification' parameter being invalid.
CLI version: 6.2.0
Appwrite deployment version: 1.6.0
**Solution:** The error is due to an invalid 'specification' parameter. Developers should ensure the specification matches one of the valid options.Recommended threads
- Cron job sometimes doesn't run
The error message is: Function timed out during cold start. Error Code: 400.
- Trying to connect platform
I'm stuck here for about 1 day how can I connect my platform i am trying to connect localhost in react
- FATAL EXCEPTION NullPointerException: nu...
Hi I'm using your SDK in my Android app... i upgraded to io.appwrite:sdk-for-android:8.1.0 and now i'm getting the following errors on Appwrite servers with ol...
