How to output binary string(or base64) as a file in controller?

72 Views Asked by At

I get pdf documents from some server api in base64 encoded format and have to send that file to browser as downlodable file.

I worked with BinaryFileResponse but it requires file path and I don't want to write files on the disk even for a second.

I've tried Symfony\Component\HttpFoundation\Request; but I can't set name of a file and it's content-type.

0

There are 0 best solutions below