Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 2.81 KB

API.md

File metadata and controls

50 lines (34 loc) · 2.81 KB

Table of contents


Class: \NGUC\NgFileChunk

Class NgFileChunk

Visibility Function
public __construct(string $fileId='', string $name='', integer $size, integer $currentSize, integer $number, integer $totalSize) : void
public populate(string $fileId, string $name) : void
Populate the chunk the rest of the data from the request

Class: \NGUC\NGUCException

Class NGUCException

Visibility Function

This class extends \Exception

This class implements \Throwable


Class: \NGUC\NgUploadChunked

Class NgUploadChunked

Visibility Function
public __construct(array $config=array()) : void
public abort(string $fileId) : boolean
Abort the current upload by deleting the current file been uploaded
public getConfig() : array $config
public getUploadPath() : void
Gets the path where the file will be stored after is fully uploaded
public getUploadedSize(string $fileId) : int
Gets the current size fo the file that is being uploaded in chunks
public isFinished() : boolean $finished
public process(\NGUC\NgFileChunk $chunk) : void
Handle the uploaded by chunk
public setConfig(array $config=array()) : void
protected getFilePath(string $fileId) : void
Get the path of the file where the chunks are being appended
protected readAndAppendChunk(string $path) : void
Read the data from the file chunk uploaded And write it directly to the destination
protected validateChunk(\NGUC\NgFileChunk $chunk) : boolean
Validate if the chunk gotten from the request has the required fields or are valid