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 | Type | Description |
---|---|---|
$fileName | string |
string
|
Returns
string
public uploadableGetUploadUrl (string $diskPath) : string
Returns the URL to the uploaded file
Parameters
Property | Type | Description |
---|---|---|
$diskPath | string |
string
|
Returns
string
public validateMediaFileName (string $fileName, string $extension) : string
Parameters
Property | Type | Description |
---|---|---|
$fileName | string |
string
|
$extension | string |
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 | Type | Description |
---|---|---|
$name | string |
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 | Type | Description |
---|---|---|
$name | mixed |
mixed
|
Returns
bool
protected validateFileType ($name) : bool
Check for blocked / unsafe file extensions
Parameters
Property | Type | Description |
---|---|---|
$name | mixed |
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