james managbanag james managbanag - 22 days ago 7
Javascript Question

Base64: How can i convert a URL to base64 format?

i do have question, i have a PDF file fetched in my server which returns a resource location URL, I want to convert it to base64 how do i do that? thank you

Answer

I hope this can help you

btoa('www.aws.com/pdf.file') //"d3d3LmF3cy5jb20vcGRmLmZpbGU="