<?php
/**
 * Created by PhpStorm.
 * User: leo
 * Date: 2018/2/24
 * Time: 下午12:48
 */
namespace frontendApi\modules\v1\controllers;

use common\helpers\Cache;
use common\models\Uploads;


class FileController extends BaseController
{
    public $modelClass = Uploads::class;

    /**
     * 获取上传token
     * @return mixed
     * @throws \yii\base\Exception
     * @throws \yii\web\HttpException
     */
    public function actionToken(){
        $token = Cache::setUploadToken();
        return static::notice($token);
    }

}