Index

Upload

MMO\edms\helpers · 1 symbol · generated 5 Oct 2026

class

Upload

Upload.php:9

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\helpers
Implements
JsonSerializable

Properties10

attachment

readonly
readonly ?string $attachment
Type
null | string

ctime

readonly
readonly int $ctime
Type
int

fileId

readonly
readonly ?string $fileId
Type
null | string

folder

readonly
readonly string $folder
Type
string

id

readonly
readonly string $id
Type
string

labels

readonly
readonly array $labels
Type
array

name

readonly
readonly string $name
Type
string

owner

readonly
readonly string $owner
Type
string

size

readonly
readonly int $size
Type
int

temporary

readonly
readonly bool $temporary
Type
bool

Methods7

getFilename()

Upload.php:36
function getFilename(): string
returnsstringthe file holding the bytes received

getMtime()

Upload.php:53
function getMtime(): int
returnsintwhen a byte was last received (unix time)

getReceived()

Upload.php:41
function getReceived(): int
returnsinthow many bytes were received

jsonSerialize()

Upload.php:75
function jsonSerialize(): array
returnsarraymixed> what a client is told of its upload: never where its bytes are, nor whose they are

__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 )
$idstring32 hexadecimal digits
$ownerstringthe uid of the client uploading
$namestringthe file's name
$sizeintthe file's size, in bytes: the upload is complete once it has them all
$labels = []arraythe ids of the labels the file will carry
$attachment = nullnull | stringthe uid of the entity the file will be attached to
$temporary = falseboolif true, no file is made of the upload: the application takes its bytes (Uploads::take)
$ctime = 0intwhen it started (unix time)
$folder = ''stringwhere its files are
$fileId = nullnull | stringthe id of the file it made, once it did (Uploads::finish)