EV3-388 Verzióváltott teszt- Új beszállító felvitele

This commit is contained in:
E98Developer 2026-03-21 06:37:48 +01:00
parent 9a7610f14f
commit 2cf461b771
2 changed files with 6 additions and 1 deletions

1
.gitignore vendored
View File

@ -23,3 +23,4 @@ Homestead.json
Homestead.yaml Homestead.yaml
Thumbs.db Thumbs.db
/storage/tmp/ /storage/tmp/
/public/images/supplierLogo/

View File

@ -132,10 +132,14 @@ private function getSupplierDataFromRequest(Request $request)
if ($request->file('logoFile')) { if ($request->file('logoFile')) {
$disk = 'image'; $disk = 'image';
$diskPath = \Storage::disk($disk)->getAdapter()->getPathPrefix(); // A Storage::path('') visszaadja a disk root könyvtárát
$diskPath = \Storage::disk($disk)->path('');
// Kiszámoljuk a relatív útvonalat a public mappához képest
$pathPrefix = str_replace(public_path(), '', $diskPath); $pathPrefix = str_replace(public_path(), '', $diskPath);
$pathPrefix = ltrim($pathPrefix, DIRECTORY_SEPARATOR); $pathPrefix = ltrim($pathPrefix, DIRECTORY_SEPARATOR);
$pathPrefix = str_replace('\\', '/', $pathPrefix); $pathPrefix = str_replace('\\', '/', $pathPrefix);
// ha van mar akkor torolni kell!!! // ha van mar akkor torolni kell!!!
if ($request->route('supplier')) { if ($request->route('supplier')) {
$supplier = Supplier::with('attachment')->find($request->route('supplier')); $supplier = Supplier::with('attachment')->find($request->route('supplier'));