Commit 123b7782 authored by clone's avatar clone

图片消息

parent 5b95a0fd
......@@ -201,7 +201,7 @@ class AppChat extends Basic
if ($file) {
$path = ROOT_PATH . 'public' . DS . 'static' . DS . 'chat_image';
$info = $file->validate([ 'size' => 512000, 'ext' => 'jpg,png' ])//限制500KB
->move($path);
->move($path);
if ($info) {
$img_path = $info->getSaveName(); //生成的图片路径
$static_path = $path . DS . $img_path; //生成图片的绝对路径
......
......@@ -219,7 +219,7 @@ class ChatService
}
return $info;
}
/**
* 保存用户发送的消息
......
......@@ -2,4 +2,4 @@
# http://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
a1.easemob.com FALSE / FALSE 1516861121 rememberMe deleteMe
a1.easemob.com FALSE / FALSE 1516863904 rememberMe deleteMe
......@@ -144,6 +144,7 @@ Route::group('chat', [
'pushMsg' => [ 'chat/AppChat/pushMsg', [ 'method' => 'post|get' ] ],
'getChatHistory' => [ 'chat/AppChat/getChatHistory', [ 'method' => 'post|get' ] ],
'getUserOrAgentInfo' => [ 'chat/AppChat/getUserOrAgentInfo', [ 'method' => 'post|get' ] ],
'uploadImg' => [ 'chat/AppChat/uploadImg', [ 'method' => 'post|get' ] ],
]);
Route::group('task',[
......
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