MediaUploadInterface
in
Implements media upload and delete functionality.
Table of Contents
Methods
- checkUploadedFile() : string
- Checks that uploaded file meets the requirements. Returns new filename.
- copyUploadedFile() : void
- Copy uploaded file to the media collection.
- deleteFile() : void
- Delete real file from the media collection.
- renameFile() : void
- Rename file inside the media collection.
Methods
checkUploadedFile()
Checks that uploaded file meets the requirements. Returns new filename.
public
checkUploadedFile(UploadedFileInterface $uploadedFile[, string|null $filename = null ][, array<string|int, mixed>|null $settings = null ]) : string
Parameters
- $uploadedFile : UploadedFileInterface
- $filename : string|null = null
- $settings : array<string|int, mixed>|null = null
Tags
Return values
stringcopyUploadedFile()
Copy uploaded file to the media collection.
public
copyUploadedFile(UploadedFileInterface $uploadedFile, string $filename[, array<string|int, mixed>|null $settings = null ]) : void
WARNING: Always check uploaded file before copying it!
Parameters
- $uploadedFile : UploadedFileInterface
- $filename : string
- $settings : array<string|int, mixed>|null = null
Tags
deleteFile()
Delete real file from the media collection.
public
deleteFile(string $filename[, array<string|int, mixed>|null $settings = null ]) : void
Parameters
- $filename : string
- $settings : array<string|int, mixed>|null = null
renameFile()
Rename file inside the media collection.
public
renameFile(string $from, string $to[, array<string|int, mixed>|null $settings = null ]) : void
Parameters
- $from : string
- $to : string
- $settings : array<string|int, mixed>|null = null