I am trying to open a local file and create a File object from an image file using the following code
var newFileObj = new File([buffer],fileObj.originalname,{type: fileObj.mimetype});
However this gives me File is undefined. I am using nodejs v7.0.0
Do i need to require any file before for using File type?
P.S- This is a REST API , there is no html involved.
via Gourav Saha
No comments:
Post a Comment