22 lines
496 B
PHP
22 lines
496 B
PHP
<?php
|
|
namespace service\modules\v1\controllers;
|
|
use common\core\BaseServiceController;
|
|
use common\services\UploadService;
|
|
|
|
/**
|
|
* @doc-module 文件上传
|
|
*/
|
|
class AttachmentController extends BaseServiceController
|
|
{
|
|
/**
|
|
* @doc-name 上传
|
|
* @doc-param file file 文件file
|
|
* @doc-return string url url
|
|
*/
|
|
public function actionUpload($name = 'file')
|
|
{
|
|
$uploadService = new UploadService();
|
|
return ['url' => $uploadService->index($name)];
|
|
}
|
|
}
|