How do I pass a blob from frontend to backend api?

I'm working on a project using next.js pages directory and langchain's pdf loader. I would like to pass a pdf from frontend to my api so that I can read the contents, create embeddings and store the vectors. I would not like to store the pdf itself. Is there an approach to this that I could work off?
1 Reply
Andrea Peverelli
Andrea Peverelli16mo ago
U've to manage a frontend form with file upload and install a parser on the backend to take that file as a prop of ur request handler, if i'm not wrong in the config of nextjs there's that option for the parser, if not u can use a lib or manage the request by hand
Want results from more Discord servers?
Add your server