Convert buffered file data to Json object: express-fileupload
Given what you presented in the debug, your encoding is not utf8
but 7bit
. So for a proper decoding you will need to change a bit your code.
var file = req.files.seed;var obj = JSON.parse(file.data.toString('ascii'));// ... do your creation logic
Any way you can play with the utf8
, ascii
econdings to see if you do not have JSON.parse
problems.