uploading and saving pdf files in a database
Unanswered
American black bear posted this in #help-forum
American black bearOP
I need some help. I have a next.js application which allows users to create an account so far. The main purpose of the application is for users to be able to upload pdfs from their computer and view them(maybe share with other users later on). I have used mongodb to store user data but now iam not sure how to save pdfs. Whats the best course of action here? I will of course need to save some sort of reference(user id) with each pdf so I can easily retrieve them. It's a very important project for me, I will be grateful for any help.
1 Reply
@American black bear I need some help. I have a next.js application which allows users to create an account so far. The main purpose of the application is for users to be able to upload pdfs from their computer and view them(maybe share with other users later on). I have used mongodb to store user data but now iam not sure how to save pdfs. Whats the best course of action here? I will of course need to save some sort of reference(user id) with each pdf so I can easily retrieve them. It's a very important project for me, I will be grateful for any help.
Upload the pdf to a storage service like s3 or r2, then save the reference to that pdf to your db