how to parse incoming pdf so I can access it properly in my backed route
Unanswered
American black bear posted this in #help-forum
American black bearOP
I am trying to send pdf data from the front-end to an api route from where I want to send it to mongodb database. The problem is coming the backend. I know i have to parse the file before I can access it over there but I can't seem to figure out how. Can anyone please help.
1 Reply
@American black bear I am trying to send pdf data from the front-end to an api route from where I want to send it to mongodb database. The problem is coming the backend. I know i have to parse the file before I can access it over there but I can't seem to figure out how. Can anyone please help.
const formData = await request.formData()
const file = await formData.get('file')
const file = await formData.get('file')