Property | Type | Description | |
---|---|---|---|
$chunkCount | file chunk counts. | ||
$chunkSize | chunk size in bytes. | ||
$collection | file collection to be used. | ||
$document | additional file document contents. Common GridFS columns: - metadata: array, additional data associated with the file. - aliases: array, an array of aliases. - contentType: string, content type to be stored with the file. | ||
$filename | filename to be used for file storage. | ||
$length | total upload length in bytes. |
Method | Description | |
---|---|---|
__destruct ( ) | Destructor. | |
addContent ( string $content ) | Adds string content to the upload. | |
addFile ( string $filename ) | Adds a file content to the upload. | |
addStream ( resource $stream ) | Adds stream content to the upload. | |
cancel ( ) | Cancels the upload. | |
complete ( ) : array | Completes upload. | |
init ( ) |
Method | Description | |
---|---|---|
flushBuffer ( boolean $force = false ) | Flushes [[buffer]] to the chunk if it is full. | |
insertChunk ( string $data ) | Inserts file chunk. | |
insertFile ( ) : array | Inserts [[document]] into file collection. |
public addContent ( string $content ) | ||
$content | string | binary content. |
public addStream ( resource $stream ) | ||
$stream | resource | data source stream. |
public $document |