Field::getFile()
Version 4.1
Return File object
Version 4.1
Return File object
Return object of first file in field.
Object TiedostoFile -object
Show filename of the file
$fileName = $sivu->tiedosto->getFile()->getFilename();
Method | return | Description |
---|---|---|
getId() | int | File database id. |
getFile() | string | File path (2025.1) |
getFilename() | string | Full name of the file. |
getFiletype() | string | File type. |
getFiletypeIcon() | string | Get url of the filetype icon. |
getThumbnail() | string | Get url of the thumbnail image. Filetype icon, if not an image. |
getFilesize() | int | Filesize in bytes. |
showFilesize() | string | Filesize in readable form. |
getWidth() | int | Image size in pixels. |
getHeight() | int | Image size in pixels. |
getTitle() | string | File visible title text. |
getDescription() | string | File description text. |
isImage() | bool | Return TRUE if file is image. |
getContent() | string | Return file content (2025.1) |
outputFile() | Stream file to browser (2025.1) | |
updateFile(array) | bool | Update file: (title, description, filename, content) (2025.1) |
createThumbnailFile($param,$force) | string | Return file name. $param Array (file,size,quality=100,square=bool). If file is not given, creates unique name for temp file from given parameters. |