|
@@ -48,7 +48,7 @@ class Core
|
|
|
{
|
|
|
if (!$this->base) {
|
|
|
$path = Config::data();
|
|
|
- $this->base = $path . 'upload/';
|
|
|
+ $this->base = Dever::path($path . 'upload/');
|
|
|
}
|
|
|
|
|
|
return $this->base;
|
|
@@ -187,7 +187,7 @@ class Core
|
|
|
header('Content-type: text/json; charset=utf-8');
|
|
|
|
|
|
$file = base64_decode($this->data['file']);
|
|
|
- $path = Dever::path($this->base . 'tmp/');
|
|
|
+ $path = Dever::path($this->base, 'tmp/');
|
|
|
$this->data['file'] = array();
|
|
|
$this->data['file']['name'] = 'Tmp' . String::rand(8) . md5(microtime() . rand(0,1000)) . '.jpg';
|
|
|
$this->data['file']['tmp_name'] = $path . $this->data['file']['name'];
|