mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Added some debugging - will remove at RC
This commit is contained in:
parent
041fc20955
commit
66686f8080
|
@ -121,13 +121,17 @@ class ImageUploadRequest extends Request
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the user isn't uploading anything new but wants to delete their old image, do so
|
// If the user isn't uploading anything new but wants to delete their old image, do so
|
||||||
} elseif ($this->input('image_delete')=='1') {
|
} else {
|
||||||
|
\Log::debug('No image was passed - not sure what to do now.');
|
||||||
|
if ($this->input('image_delete')=='1') {
|
||||||
|
|
||||||
try {
|
|
||||||
Storage::disk('public')->delete($path.'/'.$item->{$fieldname});
|
try {
|
||||||
$item->{$fieldname} = null;
|
Storage::disk('public')->delete($path . '/' . $item->{$fieldname});
|
||||||
} catch (\Exception $e) {
|
$item->{$fieldname} = null;
|
||||||
\Log::debug($e);
|
} catch (\Exception $e) {
|
||||||
|
\Log::debug($e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue