Fixed path issue during upload image by model
This commit is contained in:
parent
318a40c222
commit
b6970ebef7
@ -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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user