Since the storage system of each client is different, the saving is done in the backend instead of in the appwrite function
What's client platforms do you have? What backend are you referring to?
These are management applications made in vue3 in the frontend part and Typescript in the backend part.
Clients have a billing application and the appwrite function is responsible for collecting the invoice data and creating the pdf document
So you're using nuxt with a server side backend?
What's calling the function? The browser or the server side back end?
Yes, i dont use nuxt only vue but its the same.
I call the function in the server side
so if your function puts it in storage, your server can use storage.getFileView() to get the file buffer
Yes, I understand the procedure. Store the file and facilitate access to download it via appwrite storage.
The question to increase the response size was to have a temporary solution since the file system will take some time to implement it in several clients.
Thanks for your time and help @Steven I apreciate your job and dedication to this awesome plattform 🙂
what file system???? There is no file system involved in what i am suggesting
I'm sorry, maybe I didn't explain well
What I mean is that it will take me some time to change the implementation on the server side since there are several clients.
Instead of capturing a buffer in the return of the function, now it should capture something lighter like the url of the file to be able to download it previously on the server side.
it will take time to make any sort of change to the server side code?
Yes
For the moment I have managed to solve the problem temporarily, reducing the size of the pdf before returning it.
because the change should be something like:
const execution = functions.createExecution('[FUNCTION_ID]');
const buffer = execution.response;
to:
const execution functions.createExecution('[FUNCTION_ID]');
const fileId = execution.response;
const buffer = storage.getFileView('[BUCKET_ID]', fileId);
Would there be a simple way to programmatically delete the files after x time?
create an Appwrite Function that runs on a schedule to find and delete files
great
anyways...changing the limit can be complex because it's limited to 1MB in the database: https://github.com/appwrite/appwrite/blob/96fa7362f3f045c242758b7e42469e982a3039bf/app/config/collections.php#L2691-L2701
and the data from the runtime is trimmed: https://github.com/appwrite/appwrite/blob/96fa7362f3f045c242758b7e42469e982a3039bf/app/executor.php#L578-L580
that's why using storage is a much better alternative
Yes, I noticed that when trying to parse the response JSON it indicated that it was not valid. I saw that feature on github where you guys talked about: https://github.com/appwrite/appwrite/issues/3434
The change is simple but since I have it implemented in several projects I will need to take some time to test it in development and then upload it to production.
But we agree that the file system is the best option.
makes sense. thanks for the insight 👍🏼
Thanks 4 all @Steven
Recommended threads
- [v1.8.1] Getting error "(role: applicati...
... but that scope doesn't exist. I am trying to get a function to run and modify tables in the database dynamically. I set everything up and eventually got: ...
- Scheduled function silently stopped firi...
Function is scheduled `* * * * *` and is `enabled: true`, but Appwrite Cloud has stopped queueing executions. Last execution: **2026-05-30 00:47 UTC** (~46h...
- Unable to create Sites or Functions with...
Heya, I was looking at the appwrite documentation for Sites API with the server api: https://appwrite.io/docs/references/cloud/server-nodejs/sites I can’t fin...