Hi everyone!
I'm trying to use the pdf preview component but it doesn't seem to work.
The S3 resource query to read a file offers a data.Body
but that body seems to be an octet-stream
:
The component wants a base64
string representation of the file. I used btoa()
in the S3 query results transformer to convert the Body
string but it doesn't seem to like that:
Quick update:
I also tried turning the result into the object it seems to expect and now it returns a different error:
What am I missing?
Many thanks,
Fina