79162605

Date: 2024-11-06 12:41:34
Score: 1.5
Natty:
Report link

Found the solution of this.

We need to convert file to binary and send it:

$sendBinaryFileContent = 'data:application/pdf;base64,'.base64_encode(file_get_contents($filePath));

Binary file handle:

$binaryFile = str_replace('data:application/pdf;base64,', '', $binaryFile); 
$file = base64_decode($binaryFile);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Payal Desai