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

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -