Fixed path issue during upload image by model

This commit is contained in:
Stepan 2025-06-27 22:44:05 +02:00
parent 318a40c222
commit b6970ebef7

View File

@ -139,7 +139,7 @@ abstract class AdminSingleController extends AdminBaseController
case 'image': case 'image':
$file = $_FILES[$field['model_field']]; $file = $_FILES[$field['model_field']];
if (isset($file)) { if (isset($file)) {
$path = upload_file($file, $this->model_сlass_name . '/', 'image'); $path = upload_file($file, $this->model_сlass_name::$table_name . '/', 'image');
if (!empty($path)) { if (!empty($path)) {
$field_value = $path; $field_value = $path;