public static function getType($ext)
    {
        $ftl = static::getInstance();
        if (strpos($ext, '.') !== false) {
            // filename
            $app = Application::getFacadeApplication();
            $h = $app->make('helper/file');
            $ext = $h->getExtension($ext);
        }
        $ext = strtolower($ext);
        if (isset($ftl->types[$ext])) {
            return $ftl->types[$ext];
        } else {
            $ft = new FileType(); // generic
            return $ft;
        }
    }