问题
Here is my code i want to upload generated pdf file to amazon s3 bucket.
$html2pdf = new Html2Pdf('P', 'A4', 'fr', true, 'UTF-8', array(0, 0, 0, 0));
$html2pdf->pdf->SetDisplayMode('fullpage');
ob_start();
if($pdfType === "lease_agreement"){
include dirname(__FILE__).'/res/somecontent.php';
}
$content = ob_get_clean();
$html2pdf->writeHTML($content);
$file = dirname(__FILE__)."/temp_files/some_content-".uniqid().".pdf";
$html2pdf->output($file,'F');
If i do $html2pdf->output(dirname(__FILE__)."/temp_files/some_content-".uniqid().".pdf", 'F');
it will upload to the server folder.
Is there anyway i can upload file directly to amazon-s3 bucket ?
thanks in advance.
来源:https://stackoverflow.com/questions/55293465/html2pdf-upload-pdf-file-dierctly-to-the-amazon-s3-bucket