Hi , I am trying to build a pdf parser, I am using the fs-extra npm module. The fs-extra module readFileSync method needs the full path of the file on the customers machine which was uploaded.
let dataBuffer = fs . readFileSync ( //Full path of the uploaded file );
I tried giving both the path after the file was uploaded
wix:document://v1/
ttps://docs.wixstatic.com/ugd/
It cannot read any of these paths. I think it needs a local path of the file on the users machine. Can someone help me code to finding the local path when the user is trying to upload a file ?
Thanks @russian-dima . I already looked into these apis. The problem is
fs . readFileSync (//path) only accepts local file path as input. It does not accept any url. I need the local path of the file on my device when i click the upload button. I wanted to see how do i grab the local path of the file on the users device when they upload a document.
Unless you know how readFileSync will work with a static web url. (I already have the full url of the pdf file) which doesnt seem to work with this api.
Thanks @russian-dima . I had seen these and tried suggestions but i get an error when using a url.
My use case:
When a member uploads a resume pdf using the wix upload button it uploads the resume pdf on wix and wix returns a static url. I want to then use this pdf to parse certain text from the resume pdf and store it in my db collection. That is why i am call this readFileSync() method from the fs-extra npm package to help me readFileSync() and then i call the pdf parse to parse text on the buffer returned from the readFileSync() method.