Q: decode buffer data -Appwrite nodesdk

30 views Asked by At

I am testing the node sdk methods and try to download a deployed function. I imagine that I could inspect the code that is currently executed if the function gets called. Or what is the intended purpose of this sdk method ?

The downloadDeployment() method returns a buffer object. Now I don't know how I could read it or how to decode it since I do not know how the data is encoded.

And I think this behaviour would be also true for storage media, but I did not try that out yet.

Can you help me?

1

There are 1 answers

0
adityaoberai On

A function deployment on Appwrite essentially contains a .tar.gz file or a tarball, compressed with your function's code and its necessary dependencies.

The downloadDeployment method returns a buffer object representing this tarball, which you can then write to your system.