rabin 6 роки тому
батько
коміт
64b256ce9e
1 змінених файлів з 3 додано та 1 видалено
  1. 3 1
      src/View.php

+ 3 - 1
src/View.php

@@ -52,7 +52,9 @@ class View
         if ($data['file']) {
             foreach ($data['file'] as $k => $v) {
                 $data['file'][$k]['url'] = Dever::upload('{uploadRes}' . $v['file']);
-                $data['file'][$k]['pic'] = Dever::upload('{uploadRes}' . $v['file']);
+                if (!isset($v['pic'])) {
+                    $data['file'][$k]['pic'] = Dever::upload('{uploadRes}' . $v['file']);
+                }
             }
         }