public function useDefaults()
    {
        // Allow basic text, graphic, video, data and archive file types
        $allowedTypes = [
            'ai', 'aif', 'aiff', 'avi', 'bmp', 'bz2', 'csv', 'doc', 'docx', 'eps', 'fla', 'flv', 'gif', 'gz',
            'jpe','jpg', 'jpeg', 'log', 'md', 'mov', 'mp2', 'mp3', 'mp4', 'mpg', 'mpeg', 'otf', 'pdf',
            'png', 'ppt', 'pptx', 'psd', 'rar', 'svg', 'swf', 'tar', 'tbz', 'tbz2', 'tgz', 'tif', 'tiff', 'tsv',
            'ttf', 'txt', 'wav', 'wma', 'wmv', 'xls', 'xlsx', 'xml', 'zip'
        ];

        // Disallow programming/development file types
        $disallowedTypes = [
            'css', 'htm', 'html', 'js', 'json', 'pgsql', 'php', 'php3', 'php4', 'php5', 'sql', 'sqlite', 'yaml', 'yml'
        ];

        // Set max file size to 10 MBs
        $this->setMaxSize(10000000);
        $this->setAllowedTypes($allowedTypes);
        $this->setDisallowedTypes($disallowedTypes);

        return $this;
    }
public function useDefaults()
    {
        // Allow basic text, graphic, video, data and archive file types
        $allowedTypes = [
            'ai', 'aif', 'aiff', 'avi', 'bmp', 'bz2', 'csv', 'doc', 'docx', 'eps', 'fla', 'flv', 'gif', 'gz',
            'jpe','jpg', 'jpeg', 'log', 'md', 'mov', 'mp2', 'mp3', 'mp4', 'mpg', 'mpeg', 'otf', 'pdf',
            'png', 'ppt', 'pptx', 'psd', 'rar', 'svg', 'swf', 'tar', 'tbz', 'tbz2', 'tgz', 'tif', 'tiff', 'tsv',
            'ttf', 'txt', 'wav', 'wma', 'wmv', 'xls', 'xlsx', 'xml', 'zip'
        ];

        // Disallow programming/development file types
        $disallowedTypes = [
            'css', 'htm', 'html', 'js', 'json', 'pgsql', 'php', 'php3', 'php4', 'php5', 'sql', 'sqlite', 'yaml', 'yml'
        ];

        // Set max file size to 10 MBs
        $this->setMaxSize(10000000);
        $this->setAllowedTypes($allowedTypes);
        $this->setDisallowedTypes($disallowedTypes);

        return $this;
    }
public function useDefaults ( ) { // Allow basic text, graphic, video, data and archive file types $ allowedTypes = [ 'ai' , 'aif' , 'aiff' , 'avi' , 'bmp' , 'bz2' , 'csv' , 'doc' , 'docx' , 'eps' , 'fla' , 'flv' , 'gif' , 'gz' , 'jpe' , 'jpg' , 'jpeg' , 'log' , 'md' , 'mov' , 'mp2' , 'mp3' , 'mp4' , 'mpg' , 'mpeg' , 'otf' , 'pdf' , 'png' , 'ppt' , 'pptx' , 'psd' , 'rar' , 'svg' , 'swf' , 'tar' , 'tbz' , 'tbz2' , 'tgz' , 'tif' , 'tiff' , 'tsv' , 'ttf' , 'txt' , 'wav' , 'wma' , 'wmv' , 'xls' , 'xlsx' , 'xml' , 'zip' ] ; // Disallow programming/development file types $ disallowedTypes = [ 'css' , 'htm' , 'html' , 'js' , 'json' , 'pgsql' , 'php' , 'php3' , 'php4' , 'php5' , 'sql' , 'sqlite' , 'yaml' , 'yml' ] ; // Set max file size to 10 MBs $ this -> setMaxSize ( 10000000 ) ; $ this -> setAllowedTypes ( $ allowedTypes ) ; $ this -> setDisallowedTypes ( $ disallowedTypes ) ; return $ this ; }
Use default file upload settings

@return Upload
Use default file upload settings