Documentations › mmo.edms › php › helpers Upload MMO\edms\helpers · 1 symbol · generated 5 Oct 2026
An upload in progress, as Uploads keeps it: what the first request said about the file, and its bytes so far ({id}.part, next to its description {id}.json). A client only ever knows its id.
final class MMO\edms\helpers\Upload
implements JsonSerializable Namespace MMO\edms\helpersImplements JsonSerializable Properties10 readonly ?string $attachment Type null | string readonly int $ctime Type int readonly ?string $fileId Type null | string readonly string $folder Type string readonly string $id Type string readonly array $labels Type array readonly string $name Type string readonly string $owner Type string readonly int $size Type int readonly bool $temporary Type bool Methods7 function getFilename(): string returns string the file holding the bytes received
function getMtime(): int returns int when a byte was last received (unix time)
function getReceived(): int returns int how many bytes were received
function isComplete(): bool function jsonSerialize(): array returns array mixed> what a client is told of its upload: never where its bytes are, nor whose they are
function toArray(): array __construct($id, $owner, $name, $size, $labels, $attachment, $temporary, $ctime, $folder, $fileId) Upload.php:22 function __construct(
string $id,
string $owner,
string $name,
int $size,
array $labels = [],
?string $attachment = null,
bool $temporary = false,
int $ctime = 0,
string $folder = '',
?string $fileId = null
) $id string 32 hexadecimal digits $owner string the uid of the client uploading $name string the file's name $size int the file's size, in bytes: the upload is complete once it has them all $labels = [] array the ids of the labels the file will carry $attachment = null null | string the uid of the entity the file will be attached to $temporary = false bool if true, no file is made of the upload: the application takes its bytes (Uploads::take ) $ctime = 0 int when it started (unix time) $folder = '' string where its files are $fileId = null null | string the id of the file it made, once it did (Uploads::finish )