\app\common\libraryUpload

Summary

Methods
Properties
Constants
__construct()
setFile()
upload()
merge()
clean()
chunk()
No public properties found
No constants found
checkExecutable()
checkImage()
checkSize()
checkMimetype()
getSavekey()
$file
$fileInfo
$merging
$chunkDir
N/A
No private methods found
No private properties found
N/A

Properties

$file

$file

$fileInfo

$fileInfo

$merging

$merging

$chunkDir

$chunkDir

Methods

__construct()

__construct(mixed  $file = null) : mixed

Parameters

mixed $file

Returns

mixed —

setFile()

setFile(mixed  $file) : mixed

Parameters

mixed $file

Returns

mixed —

upload()

upload(string  $dir = '', string  $from = '', mixed  $savekey = null) : string|\think\response\Json

保存附件

Parameters

string $dir

附件存放的目录

string $from

来源

mixed $savekey

Returns

string|\think\response\Json —

merge()

merge(string  $chunkid, int  $chunkcount, string  $filename, mixed  $dir, mixed  $from) : \app\common\library\attachment|\think\Model

合并分片文件

Parameters

string $chunkid
int $chunkcount
string $filename
mixed $dir
mixed $from

Throws

\app\common\exception\UploadException

Returns

\app\common\library\attachment|\think\Model —

clean()

clean( $chunkid) : mixed

清理分片文件

Parameters

$chunkid

Returns

mixed —

chunk()

chunk(mixed  $chunkid, mixed  $chunkindex, mixed  $chunkcount, mixed  $chunkfilesize = null, mixed  $chunkfilename = null, mixed  $direct = false) : mixed

分片上传

Parameters

mixed $chunkid
mixed $chunkindex
mixed $chunkcount
mixed $chunkfilesize
mixed $chunkfilename
mixed $direct

Returns

mixed —

checkExecutable()

checkExecutable() : mixed

Returns

mixed —

checkImage()

checkImage(mixed  $force = false) : mixed

Parameters

mixed $force

Returns

mixed —

checkSize()

checkSize(mixed  $dir) : mixed

Parameters

mixed $dir

Returns

mixed —

checkMimetype()

checkMimetype(mixed  $dir) : mixed

Parameters

mixed $dir

Returns

mixed —

getSavekey()

getSavekey(mixed  $dir, mixed  $savekey = null, mixed  $filename = null, mixed  $md5 = null) : mixed

Parameters

mixed $dir
mixed $savekey
mixed $filename
mixed $md5

Returns

mixed —