I am trying to write an email client that reads email files that have been sent to an S3 bucket via AWS SES and displays those email files in a browser like other email clients do. One of the tasks that I am grappling with is how to display the attachments which I get in the form of a buffer. For example, for a pdf attachment, I get a data buffer of contentType "application/pdf". Is there a way to embed this data stream into a HTML field such that it shows up as a properly formatted pdf document?
here is screen shot of what I have at the client page level: