FileUploadSanitizeNameEvent
class FileUploadSanitizeNameEvent extends Event (View source)
An event during file upload that lets subscribers sanitize the filename.
Properties
| protected string | $filename | The name of the file being uploaded. |
|
| protected string[] | $allowedExtensions | A list of allowed extensions. |
|
| protected bool | $isSecurityRename | Indicates the filename has changed for security reasons. |
Methods
__construct(string $filename, string $allowed_extensions)
Constructs a file upload sanitize name event object.
string
getFilename()
Gets the filename.
setFilename(string $filename)
Sets the filename.
array
getAllowedExtensions()
Gets the list of allowed extensions.
setSecurityRename()
Sets the security rename flag.
bool
isSecurityRename()
Gets the security rename flag.
void
stopPropagation()
{@inheritdoc}
Details
__construct(string $filename, string $allowed_extensions)
Constructs a file upload sanitize name event object.
string
getFilename()
Gets the filename.
FileUploadSanitizeNameEvent
setFilename(string $filename)
Sets the filename.
array
getAllowedExtensions()
Gets the list of allowed extensions.
FileUploadSanitizeNameEvent
setSecurityRename()
Sets the security rename flag.
bool
isSecurityRename()
Gets the security rename flag.
void
stopPropagation()
{@inheritdoc}