What format should nodejs file content be transferred to php?

  node.js, question

Such as nodejs:

var fileData = nodeRequire('fs').readFileSync(fpath);

The data type obtained is buffer, but what type will buffer be converted to for transmission?


Neither fileData.toString(‘binary’) nor fileData.toString ().

I found the answer myself.

ToString (‘Base64’)

Do not convert to another format and then to base64