rabin 7 роки тому
батько
коміт
28969bea5f
3 змінених файлів з 5 додано та 5 видалено
  1. 1 1
      index.php
  2. 2 2
      src/Save.php
  3. 2 2
      src/Store/Core.php

+ 1 - 1
index.php

@@ -3,5 +3,5 @@ define('DEVER_APP_NAME', 'upload');
 define('DEVER_APP_LANG', '文件上传系统');
 define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
 define('DEVER_MANAGE_ORDER', -90);
-define('DEVER_MANAGE_ICON', 'glyphicon glyphicon-file');
+define('DEVER_MANAGE_ICON', 'glyphicon glyphicon-upload');
 include(DEVER_APP_PATH . '../boot.php');

+ 2 - 2
src/Save.php

@@ -26,12 +26,12 @@ class Save
 
 	public function action_api()
 	{
-		return $this->output;
+		Dever::outDiy($this->output);
 	}
 
 	public function start_api()
 	{
-		return $this->output;
+		Dever::outDiy($this->output);
 	}
 
 	public function drag_api()

+ 2 - 2
src/Store/Core.php

@@ -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'];