图片上传 #11
|
@ -37,7 +37,7 @@ class UploadController extends BaseApiController
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$result = UploadService::image(0, $this->userId,FileEnum::SOURCE_USER);
|
$result = UploadService::image(0, $this->userId,FileEnum::SOURCE_USER);
|
||||||
return $this->success('上传成功', $result);
|
return $this->success('上传成功', ['url'=>env('project.project_url').'/'.$result['url']]);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return $this->fail($e->getMessage());
|
return $this->fail($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue