Change QR code output to SVG to avoid GD dependency; fix permissions for uploads
This commit is contained in:
parent
ef5bf3ecca
commit
9fb5066f9b
Binary file not shown.
@ -171,13 +171,11 @@ class ItemController
|
||||
mkdir($qrDir, 0755, true);
|
||||
}
|
||||
$options = new QROptions([
|
||||
'outputType' => QRCode::OUTPUT_IMAGE_PNG,
|
||||
'outputType' => QRCode::OUTPUT_MARKUP_SVG,
|
||||
'eccLevel' => QRCode::ECC_L,
|
||||
'imageTransparent' => false,
|
||||
'imageBase64' => false,
|
||||
]);
|
||||
$qrCode = new QRCode($options);
|
||||
$qrCode->render($idCode, $qrDir . $idCode . '.png');
|
||||
$qrCode->render($idCode, $qrDir . $idCode . '.svg');
|
||||
}
|
||||
|
||||
public static function printQR($id) {
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
<div class="qr-container">
|
||||
<h2>{{ item.name }}</h2>
|
||||
<p>ID Code: {{ item.id_code }}</p>
|
||||
<img src="/uploads/qr/{{ item.id_code }}.png" alt="QR Code" class="qr-code">
|
||||
<img src="/uploads/qr/{{ item.id_code }}.svg" alt="QR Code" class="qr-code">
|
||||
<div class="details">
|
||||
<p><strong>Description:</strong> {{ item.description }}</p>
|
||||
<p><strong>Category:</strong> {{ item.category_path ?: 'Uncategorized' }}</p>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user