Posting PDF to S3

Hello, I Hope this is the right section for Question, it feels like it is. I am working on an Project, part of it is an REST Api and different front ends (admin page, employee page, customer page ). We are using aws s3 to save relevant files, like customer bills, employees qualifications, etc. Primarily PDF (if not only). I am struggling to POST PDF documents to S3. Currently it goes from client -> rest api -> s3. The PDF Saved on S3 is blank. I Tried debugging client -> api-> client. Here is the PDF also blank. So I guess I am not sending the PDF correctly, googling gives me many different solutions, none work. I am working in the nextjs framework. Anybody already had issues with that?
4 Replies
barry
barry2y ago
Have you tried just using presented urls Presigned*
Balduin
BalduinOP2y ago
No, because we decided not to use presigned urls, but I would try if there is no other solution. Also it would reduce API traffic
barry
barry2y ago
Idk what would turn pdfs blank though
Balduin
BalduinOP2y ago
has to do something with the encoding not beeing set right. (I am currently think) i tried to get the correct encoding from downloading a pdf from S3 (uploaded via browser) but there its not set at all...
Want results from more Discord servers?
Add your server