Let people upload images on the demo

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2025-08-10 18:20:35 +01:00
parent 543d41b6ff
commit 2f146abe91

View File

@@ -100,7 +100,6 @@ class ImageUploadRequest extends Request
if (isset($image)) {
if (!config('app.lock_passwords')) {
$ext = $image->guessExtension();
$file_name = $type.'-'.$form_fieldname.($item->id ?? '-'.$item->id).'-'.str_random(10).'.'.$ext;
@@ -145,7 +144,7 @@ class ImageUploadRequest extends Request
// Remove Current image if exists
$item = $this->deleteExistingImage($item, $path, $db_fieldname);
$item->{$db_fieldname} = $file_name;
}
// If the user isn't uploading anything new but wants to delete their old image, do so