\Core\PluginsFileUpload

FileUpload 文件上传

该类不能直接new,需要使用make方法实例化 因为该类里面使用了依赖注入

Summary

Methods
Properties
Constants
__construct()
uploadFile()
getFileInfo()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
upFile()
getSavePath()
getUploadPath()
getFilename()
getStateInfo()
checkType()
checkSize()
saveDatabase()
$file
$config
$oriName
$filename
$uploadPath
$fileSize
$fileType
$fileMd5
$stateInfo
$id
$stateMap
$fileInfo
$attachmentService
$auth
N/A

Properties

$file

$file : 

Type

$config

$config : 

Type

$oriName

$oriName : 

Type

$filename

$filename : 

Type

$uploadPath

$uploadPath : 

Type

$fileSize

$fileSize : 

Type

$fileType

$fileType : 

Type

$fileMd5

$fileMd5 : 

Type

$stateInfo

$stateInfo : 

Type

$id

$id : 

Type

$stateMap

$stateMap : 

Type

$fileInfo

$fileInfo : 

Type

Methods

__construct()

__construct(  $file, array  $uploadParams = array()) 

FileUpload constructor.

Parameters

$file

文件对象

array $uploadParams

上传参数

uploadFile()

uploadFile(string  $type = 'upload') 

uploadFile 上传文件 User:YM Date:2020/2/28 Time:上午1:11

Parameters

string $type

getFileInfo()

getFileInfo() : array

getFileInfo 获取当前上传成功文件的各项信息 User:YM Date:2020/2/28 Time:上午2:39

Returns

array

upFile()

upFile() 

upFile 处理上传 User:YM Date:2020/2/28 Time:下午11:48

getSavePath()

getSavePath() : string

getSavePath 获取保存目录 User:YM Date:2020/2/28 Time:上午1:48

Returns

string

getUploadPath()

getUploadPath() : string

getUploadPath 获取文件上传相对目录 User:YM Date:2020/2/28 Time:上午12:54

Returns

string

getFilename()

getFilename() : string

getFilename 生成文件名(存储重命名) User:YM Date:2020/2/27 Time:下午11:45

Returns

string

getStateInfo()

getStateInfo(  $key) : boolean|mixed

getStateInfo 获取状态信息 User:YM Date:2020/2/27 Time:下午11:25

Parameters

$key

Returns

boolean|mixed

checkType()

checkType() : boolean

checkType 文件类型检测 User:YM Date:2020/2/27 Time:下午11:07

Returns

boolean

checkSize()

checkSize() : boolean

checkSize 文件大小检测 User:YM Date:2020/2/27 Time:下午11:08

Returns

boolean

saveDatabase()

saveDatabase(array  $fileInfo = array()) : boolean|null

saveDatabase 保存文件到数据库 User:YM Date:2020/2/28 Time:上午1:30

Parameters

array $fileInfo

Returns

boolean|null