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 NGUCException
Visibility | Function |
---|
This class extends \Exception
This class implements \Throwable
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 |