-
-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Hello,
Do you have an example using AssetMapper to find the logo path please ?
AssetMapper generate a fake link like that in public folder: assets/images/logoSite-nTKj4NV.png
My code in Service:
`
public function generateQrCodeWithLogo(string $fullUrl, string $logoPath)
{
$result = $this->customQrCodeBuilder->build(
data: $fullUrl,
margin: 0,
size: 250,
logoPath: $logoPath
);
$response = new QrCodeResponse($result);
return $response;
}
`
And my Controller:
$baseurl = $request->getScheme() . '://' . $request->getHttpHost() . $request->getBasePath(); $qrCode = $this->qrCodeService->generateQrCodeWithLogo('https://www.url.com',$baseurl.'/assets/images/logoSite-nTKj4NV.png'); $qrCodeImage = $qrCode->getContent();
But I have this error:
Could not read logo image data from path "https://127.0.0.1:8000/assets/images/logoSite-nTKj4NV.png": file_get_contents(https://127.0.0.1:8000/assets/images/logoSite-nTKj4NV.png): Failed to open stream: operation failed
If I paste the url in browser (https://127.0.0.1:8000/assets/images/logoSite-nTKj4NV.png) I see the image...
Thank you, sorry for my English and this disturbance !
René