SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class FileController

Provides access to file and image data

Functions

NameVisibilityDescription
downloadpublicRenders file contents for viewing or downloading
nameLookuppublicLooks up filenames for a list of file IDs
playAudiopublicOutputs an audio player.
redirectResizepublicRedirect to the resize url
resizepublicOn the fly image resizing

public download

void $FileController->download ( int $id [, string $size ] );

Renders file contents for viewing or downloading

public nameLookup

void $FileController->nameLookup ( );

Looks up filenames for a list of file IDs

public playAudio

void $FileController->playAudio ( mixed $filename );

Outputs an audio player.

public redirectResize

void $FileController->redirectResize ( string $size , string $filename );

Redirect to the resize url
This allows JS code to use a common URL without needing to be aware of which FilesBackend is in use

public resize

void $FileController->resize ( mixed $size , mixed $filename );

On the fly image resizing

The size parameter is the new size.
The first character is taken to be the resize type, accepts 'r' or 'c' or 'm':
Meaning 'r'esize, 'c'rop or 'm'ax resize (do not scale up).
The width and height is specified width . 'x' . height (e.g. 200x100)