Commit 8536b8fc authored by hujun's avatar hujun

key修改

(cherry picked from commit 18471836)
parent 8d8a30c1
...@@ -24,6 +24,25 @@ class UploadFileService ...@@ -24,6 +24,25 @@ class UploadFileService
*/ */
public function upload($_upload_file, $type, $size = 1000000, $ext = [ 'jpg' ]) public function upload($_upload_file, $type, $size = 1000000, $ext = [ 'jpg' ])
{ {
/**
*
upload($_FILE['file'])
array(2) {
[0] => array(3) {
["code"] => int(200)
["img_path"] => string(19) "201807021804140.jpg"
["img_ext"] => string(3) "jpg"
}
[1] => array(3) {
["code"] => int(200)
["img_path"] => string(20) "2018070218041401.jpg"
["img_ext"] => string(3) "jpg"
}
}
*/
$check = $this->checkUploadFile($_upload_file, $size, $ext); $check = $this->checkUploadFile($_upload_file, $size, $ext);
if ($check['code'] == 101) { if ($check['code'] == 101) {
...@@ -45,6 +64,7 @@ class UploadFileService ...@@ -45,6 +64,7 @@ class UploadFileService
break; break;
case 'house_img': case 'house_img':
$path .= 'resource/lib/Attachments/images/'; $path .= 'resource/lib/Attachments/images/';
break;
default : default :
$path .= 'static/'; $path .= 'static/';
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment