So, I have a file (jpg, tiff or pdf) which initially is represented as a base64-encoded string, which I create a buffer from.
Now I want to check the size of given file without writing it to filesystem first.
I am using Node v4.4.3 on Linux.
How could I go about doing this?
Use Buffer.byteLength function.