\App\ServicesCosService

Summary

Methods
Properties
Constants
__construct()
uploadFile()
No public properties found
No constants found
No protected methods found
$objectClient
N/A
genFileName()
$config
N/A

Properties

$objectClient

$objectClient : 

Type

$config

$config : \Illuminate\Config\Repository|\Illuminate\Contracts\Foundation\Application|mixed

Type

\Illuminate\Config\Repository|\Illuminate\Contracts\Foundation\Application|mixed

Methods

__construct()

__construct() 

uploadFile()

uploadFile(string  $dir, \Illuminate\Http\UploadedFile  $file) 

Parameters

string $dir

要上传去的目录 如 test/2021-01-01/ 其实 COS 并没有目录的概念 只是便于人类操作

\Illuminate\Http\UploadedFile $file

Throws

\App\Exceptions\ApiException

genFileName()

genFileName(\Illuminate\Http\UploadedFile  $file) 

Parameters

\Illuminate\Http\UploadedFile $file