Properties

$rid

$rid : 

Type

$watermark

$watermark : 

Type

$attachment_info

$attachment_info : 

Type

$attachment_model

$attachment_model : 

Type

$fileField

$fileField : 

Type

$file

$file : 

Type

$base64

$base64 : 

Type

$config

$config : 

Type

$oriName

$oriName : 

Type

$fileName

$fileName : 

Type

$fullName

$fullName : 

Type

$filePath

$filePath : 

Type

$fileUrl

$fileUrl : 

Type

$fileSize

$fileSize : 

Type

$fileType

$fileType : 

Type

$stateInfo

$stateInfo : 

Type

$stateMap

$stateMap : 

Type

Methods

__construct()

__construct(string  $fileField, array  $config,   $type = "upload") 

构造函数

Parameters

string $fileField

表单名称

array $config

配置项

$type

getFileInfo()

getFileInfo() : array

获取当前上传成功文件的各项信息

Returns

array

upFile()

upFile() : mixed

上传文件的主处理方法

Returns

mixed

upBase64()

upBase64() : mixed

处理base64编码的图片上传

Returns

mixed

saveRemote()

saveRemote() : mixed

拉取远程图片

Returns

mixed

getStateInfo()

getStateInfo(  $errCode) : string

上传错误检查

Parameters

$errCode

Returns

string

getFileExt()

getFileExt() : string

获取文件扩展名

Returns

string

getFullName()

getFullName() : string

重命名文件

Returns

string

checkType()

checkType() : boolean

文件类型检测

Returns

boolean

checkSize()

checkSize() : boolean

文件大小检测

Returns

boolean

save_attach()

save_attach(  $rt) : boolean

存储归档

Parameters

$rt

Returns

boolean