private String getType(String extension)
    {          
        switch(extension)
        {
            case "gif":
                return "image/gif";
            case "html":
                return "text/html";
            case "jpeg":
                return "image/jpeg";
            case "jpg":
                return "image/jpeg";            
            case "png":
                return "image/png";
            case "txt":
                return "text/plain";
            default:
                return "";
        }        
    }