UploadableWidget

Uploadable Widget Trait Adds media library upload features to back-end widgets

 trait Backend\Traits\UploadableWidget

Methods

public onUpload () : Illuminate\Http\Response | null

Process file uploads submitted via AJAX

Returns
Illuminate\Http\Response | null

public uploadableGetDisk () : Illuminate\Filesystem\FilesystemAdapter

Returns the disk that will be used to store the uploaded file

Returns
Illuminate\Filesystem\FilesystemAdapter

public uploadableGetUploadPath (string $fileName) : string

Returns the path on the disk to store the uploaded file

Parameters
Property Description
$fileName
string
Returns
string

public uploadableGetUploadUrl (string $diskPath) : string

Returns the URL to the uploaded file

Parameters
Property Description
$diskPath
string
Returns
string

public validateMediaFileName (string $fileName, string $extension) : string

Parameters
Property Description
$fileName
string
$extension
string
Returns
string

protected cleanFileName (string $name) : string

Creates a slug form the string. A modified version of Str::slug with the main difference that it accepts @-signs

Parameters
Property Description
$name
string
Returns
string

protected onUploadDirect () : Illuminate\Http\Response

Returns
Illuminate\Http\Response

protected validateFileName ($name) : bool

Validate a proposed media item file name.

Parameters
Property Description
$name
mixed
Returns
bool

protected validateFileType ($name) : bool

Check for blocked / unsafe file extensions

Parameters
Property Description
$name
mixed
Returns
bool

Used by

Class Description
RichEditor

Rich Editor Renders a rich content editor field.

MediaManager

Media Manager widget.

MediaManager

Media Manager widget.

Copyright © 2024 Winter CMS