Create file is listing files instead of creating the file, this inside an Appwrite function on 1.8.1
- 0
- Self Hosted
- Functions
- Storage
This is a bit strange but, I cannot create files from within a funcion. I have tested with latest SDKs versions of node and python, both instead of creating the file, return the list of files that are stored on the bucket.
result = await storage.createFile({
bucketId: OUTPUT_BUCKET_ID,
fileId: outputFileId,
file: InputFile.fromPath(tempPath, "certificate.pdf")
});
log(`createFile: ${JSON.stringify(result)}`);
createFile: {"total":3,"files":[{"$id":"69262f31001d4ecdf886","bucketId":"b_internal","$createdAt":"2025-11-25T22:35:29.899+00:00","$updatedAt":"2025-11-25T22:35:29.899+00:00","$permissions":["read(\"user:67086926000a44243115\")","update(\"user:67086926000a44243115\")","delete(\"user:67086926000a44243115\")"],"name":"university.png","signature":"561b1e77208ff23b5557b89ff8ee8ae5","mimeType":"image/png","sizeOriginal":27818,"chunksTotal":1,"chunksUploaded":1},{"$id":"69262f3500361d4be8dd","bucketId":"b_internal","$createdAt":"2025-11-25T22:35:34.283+00:00","$updatedAt":"2025-11-25T22:35:34.283+00:00","$permissions":["read(\"user:67086926000a44243115\")","update(\"user:67086926000a44243115\")","delete(\"user:67086926000a44243115\")"],"name":"signature.png","signature":"e36241b01aaa5cf646fc84cdee2c7307","mimeType":"image/png","sizeOriginal":10652,"chunksTotal":1,"chunksUploaded":1},{"$id":"6926310a0011858de642","bucketId":"b_internal","$createdAt":"2025-11-25T22:43:22.732+00:00","$updatedAt":"2025-11-25T22:43:22.732+00:00","$permissions":["read(\"user:67086926000a44243115\")","update(\"user:67086926000a44243115\")","delete(\"user:67086926000a44243115\")"],"name":"logo.png","signature":"64182af861a6f03318517c9de291613b","mimeType":"image/png","sizeOriginal":26408,"chunksTotal":1,"chunksUploaded":1}]}
Any help will be really appreciated.
Bump!
Probably downdrading a minor version will be better if this is actually a bug.
Thanks for your answer, but its weird, I have tested on my local machine and it worked, but within the appwrite functions it just does like I said. Pretty weird.
Recommended threads
- After a GET request is passed to functio...
Create execution in the console can normally retrieve the get parameters。WHy?
- function subdomain ssl certs
The generated subdomain isn't getting a valid ssl cert, I was wondering if appwrite automatically generates one or uses a wildcard for *.functions.domain.com? ...
- Whats best practise for Appwrite Cloud?
Appwrite Teams map very nicely to my needs, it is how i group users together. ... I use roles to define permissions. Should I also map a table to each team ? ...