[SOLVED] "buckets files create" FUNCTION_EVENT_DATA provides old data even with new file upload
- 0
- Functions
- Storage
Facing this odd issue, I am uploading file to storage and using cloud function to do some transformation on the files and add associated data in a DB collection.
The first file I upload gets correctly processed and I can see correct file details stored in DB however every subsequent file upload triggers the same function but the event data is of the first uploaded file ?? The file in storage bucket is correct but the function still supplies old data.
Make sure you're using req.variables
and not the operating system's environment variables
This is what I am using, do I need to go req. variables[`APPWRITE_FUNCTION_EVENT_DATA] ?
Yes, you should use req.variables
Understood let me test and come back
Thanks @Steven that indeed fixes it.
[SOLVED] "buckets files create" FUNCTION_EVENT_DATA provides old data even with new file upload
Recommended threads
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...