Backend\Controllers\Files

Overview

Files controller used for delivering protected system files, and generating URLs for accessing them.

Extends

Public Properties

There are no public properties in the class.

Show inherited public properties

Inherited Public Properties

Protected Properties

There are no protected properties in the class.

Show inherited protected properties

Inherited Protected Properties


Public Methods

public get()

public get($code = null): void

get will output a file, or fall back on the 404 page

public static getDownloadUrl()

public static getDownloadUrl($file $file): string 

getDownloadUrl returns the URL for downloading a system file.

public static getThumbUrl()

public static getThumbUrl(
    $file $file,
    $width $width,
    $height $height,
    $options $options
): string 

Returns the URL for downloading a system file.

public static getUniqueCode()

public static getUniqueCode($file $file): string 

Returns a unique code used for masking the file identifier.

public thumb()

public thumb(
    $code = null,
    $width = 100,
    $height = 100,
    $mode = 'auto',
    $extension = 'auto'
): void

thumb will output a thumbnail, or fall back on the 404 page

Show inherited public methods

Inherited Public Methods

Protected Methods

protected findFileObject()

protected findFileObject($code $code): System\Models\File 

findFileObject locates a file model based on the unique code.

protected static getTemporaryUrl()

protected static getTemporaryUrl(
    System|Models\File $file,
    string|null $path = null
): string|null 

getTemporaryUrl attempts to return a redirect to a temporary URL to the asset instead of streaming the asset - if supported

Show inherited protected methods

Inherited Protected Methods