Commit 9a1c596d authored by clone's avatar clone

bug

parent be28707a
...@@ -213,11 +213,12 @@ class AppChat extends Basic ...@@ -213,11 +213,12 @@ class AppChat extends Basic
public function uploadImg() public function uploadImg()
{ {
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
set_time_limit(0);
$file = request()->file('image'); $file = request()->file('image');
$data = []; $data = [];
if ($file) { if ($file) {
$path = ROOT_PATH . 'public' . DS . 'static' . DS . 'chat_image'; $path = ROOT_PATH . 'public' . DS . 'static' . DS . 'chat_image';
$info = $file->validate([ 'size' => 1024000, 'ext' => 'jpg,png' ])//限制100m $info = $file->validate([ 'size' => 10240000, 'ext' => 'jpg,png' ])//限制100m
->move($path); ->move($path);
if ($info) { if ($info) {
$img_path = $info->getSaveName(); //生成的图片路径 $img_path = $info->getSaveName(); //生成的图片路径
......
...@@ -238,7 +238,7 @@ require(['vue', 'vconsole', 'css!style/customerinfo_sub_page.css', 'css!style/cu ...@@ -238,7 +238,7 @@ require(['vue', 'vconsole', 'css!style/customerinfo_sub_page.css', 'css!style/cu
url: ServerHostTempC + "/chat/uploadImg", url: ServerHostTempC + "/chat/uploadImg",
type: 'POST', type: 'POST',
data: _fd, data: _fd,
timeout: 15000, timeout: 150000,
beforeSend: function() { beforeSend: function() {
_this.uploadImgFlag = true; _this.uploadImgFlag = true;
}, },
......
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