UploadableWidget
Uploadable Widget Trait Adds media library upload features to back-end widgets
Tags
Table of Contents
- onUpload() : void
- Process file uploads submitted via AJAX
- cleanFileName() : string
- Creates a slug form the string. A modified version of Str::slug with the main difference that it accepts @-signs
- validateFileName() : bool
- Validate a proposed media item file name.
- validateFileType() : bool
- Check for blocked / unsafe file extensions
Methods
onUpload()
Process file uploads submitted via AJAX
public
onUpload() : void
Tags
Return values
void —cleanFileName()
Creates a slug form the string. A modified version of Str::slug with the main difference that it accepts @-signs
protected
cleanFileName(string $name) : string
Parameters
- $name : string
Return values
string —validateFileName()
Validate a proposed media item file name.
protected
validateFileName(mixed $name) : bool
Parameters
- $name : mixed
Return values
bool —validateFileType()
Check for blocked / unsafe file extensions
protected
validateFileType(mixed $name) : bool
Parameters
- $name : mixed