Added some debugging - will remove at RC

This commit is contained in:
snipe 2020-08-24 18:32:15 -07:00
parent 041fc20955
commit 66686f8080
No known key found for this signature in database
GPG key ID: 10BFFDA3ED34B5AC

View file

@ -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);
}
} }
} }