diff --git a/anchor/models/extend.php b/anchor/models/extend.php index 0e6177b0e..ecb7678d8 100755 --- a/anchor/models/extend.php +++ b/anchor/models/extend.php @@ -137,6 +137,9 @@ public static function files() { public static function upload($file) { $storage = PATH . 'content' . DS; + + if(!is_dir($storage)) mkdir($storage); + $ext = pathinfo($file['name'], PATHINFO_EXTENSION); $filename = hash('crc32', file_get_contents($file['tmp_name'])) . '.' . $ext;