def mimetype(path)
      extension = File.basename(path).split('.')[-1]
      Rack::Mime.mime_type(".#{extension}")
    end
def mimetype(path)
      extension = File.basename(path).split('.')[-1]
      Rack::Mime.mime_type(".#{extension}")
    end
Get the mime type from a file name