<?php
// +----------------------------------------------------------------------
// | hulacwms 3.0 呼啦企业网站管理系统
// +----------------------------------------------------------------------
// | Copyright (c) 2021 https://www.kaifashu.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: 开发树
// +----------------------------------------------------------------------

namespace app\admin\controller;
use app\common\model\Picture as FilesModel;

class Files extends Auth
{
       /**
     * 图片上传
     */
    public function picture(){
        $config=config('PICTURE_UPLOAD');
        $model=new FilesModel();
        $re=$model->upload($config);
        if($re){
            $this->success("上传成功！",'',$model->info);
        }
        else{
            $this->error($model->error);
        }
    }

    /**
     * 视频上传
     */
    public function video(){
        $config=config('VIDEO_UPLOAD');
        $model=new FilesModel();
        $re=$model->upload($config);
        if($re){
            $this->success("上传成功！",'',$model->info);
        }
        else{
            $this->error($model->error);
        }
    }

    /**
     * 文件上传
     */
    public function file(){
        $config=config('FILE_UPLOAD');
        $model=new FilesModel();
        $re=$model->upload($config);
        if($re){
            $this->success("上传成功！",'',$model->info);
        }
        else{
            $this->error($model->error);
        }
    }
}
