JavaScript NodeJS Buffers

I am trying to make a client-server application where the client sends the server a list of filenames in an array such as let files = ["Cat.jpeg", "Moon.gif"] and I am trying to use Buffers so the server can send a response back to the client and open these files. But I am not sure how to approach this.

I tried

let imageNames = Buffer.from(files)

but I am not sure how to extract this and read these values.

16 thoughts on “JavaScript NodeJS Buffers”

Leave a Comment