修改本地图片上传方法名称
This commit is contained in:
parent
8fa608ec6d
commit
fa523ce3cb
@ -142,7 +142,7 @@ class LocalStore extends AdminBase
|
||||
{
|
||||
if ($this->request->isAjax()) {
|
||||
$post = $this->request->post();
|
||||
$result = UploadAliOSS::uploadImage(LocalStoreLogic::$UPLOAD_PATH[$post['type']]);
|
||||
$result = UploadAliOSS::uploadFile(LocalStoreLogic::$UPLOAD_PATH[$post['type']]);
|
||||
if ($result['code'] == 1) {
|
||||
return JsonServer::success('上传成功', $result['data']);
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ class File extends Api
|
||||
return JsonServer::error('缺少参数');
|
||||
}
|
||||
|
||||
$result = UploadAliOSS::uploadImage($path);
|
||||
$result = UploadAliOSS::uploadFile($path);
|
||||
if ($result['code'] == 1) {
|
||||
return JsonServer::success('上传成功', $result['data']);
|
||||
}
|
||||
|
||||
@ -7,8 +7,8 @@ use think\facade\Config;
|
||||
|
||||
class UploadAliOSS
|
||||
{
|
||||
// 删除图片
|
||||
public static function uploadImage($path = '')
|
||||
// 上传图片
|
||||
public static function uploadFile($path = '')
|
||||
{
|
||||
if (!$path) {
|
||||
return ['code' => -1, 'msg' => '缺少上传路径'];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user