/** * Save the file to the specified path * @return boolean TRUE on success */ function save($srcFilePath, $path) { if ($result = parent::save($srcFilePath, $path)) { if (br()->request()->get('tw') && br()->request()->get('th')) { $result['thumbnail'] = br()->images()->generateThumbnail($result['internal']['filePath'], br()->request()->get('tw'), br()->request()->get('th')); } } return $result; }
function __construct($params = array()) { $params['allowedExtensions'] = array('flv', 'avi', 'mp4', 'mov'); parent::__construct($params); }
<?php br()->importLib('FileUploadHandler'); $handler = new BrFileUploadHandler(); $handler->handle();