phasync
UploadedFile / getClientFilename

Method

UploadedFile::getClientFilename

Retrieve the filename sent by the client.

Description#

public UploadedFile::getClientFilename(): ?string

Do not trust the value returned by this method. A client could send a malicious filename with the intention to corrupt or hack your application.

Implementations SHOULD return the value stored in the "name" key of the file in the $_FILES array.

Return values#

The filename sent by the client or null if none was provided. ?string