javascript - How to handle uploaded files with Node-pdf-image? -
i'm trying create app allow user upload pdf , convert first page of uploaded file image. using https://github.com/mooz/node-pdf-image. i'm having trouble because don't know path give tool. don't have full path of pdf available on user's computer, tried uploading file s3 , using path.
uploadfile(file, 'temps') .then(uploaded => { const pdffile = new pdfimage(uploaded.secure_url); return pdffile.convertpage(0); }) .then(imagepath => console.log(imagepath)) .catch(error => console.log(error));
the above throws error fs.stat not function. how use plugin , allow users upload file app?
Comments
Post a Comment