Commit 9a1c596d authored by clone's avatar clone

bug

parent be28707a
......@@ -213,11 +213,12 @@ class AppChat extends Basic
public function uploadImg()
{
header('Access-Control-Allow-Origin:*');
set_time_limit(0);
$file = request()->file('image');
$data = [];
if ($file) {
$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);
if ($info) {
$img_path = $info->getSaveName(); //生成的图片路径
......
......@@ -238,7 +238,7 @@ require(['vue', 'vconsole', 'css!style/customerinfo_sub_page.css', 'css!style/cu
url: ServerHostTempC + "/chat/uploadImg",
type: 'POST',
data: _fd,
timeout: 15000,
timeout: 150000,
beforeSend: function() {
_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