code: protected FileInfo getFileInfoFromRequestImpl(HTTPRequest request,Map<String,String> queryStringMap)
      {
          //get file name
          String name=queryStringMap.get("file");
          if(name==null)
          {
              throw new FaxException("File name not provided in query string.");
          }
          
          //get content
          byte[] content=null;
          ContentType contentType=request.getContentType();
          switch(contentType)
          {
              case BINARY:
                  content=request.getContentAsBinary();
                  break;
              case STRING:
                  String contentString=request.getContentAsString();
                  content=IOHelper.convertStringToBinary(contentString,null);
                  break;
              default:
                  throw new FaxException("Unsupported content type: "+contentType);
          }
          if((content==null)||(content.length==0))
          {
              throw new FaxException("File content not provided in request payload.");
          }
          
          //create file info
          FileInfo fileInfo=new FileInfo(name,content);
          
          return fileInfo;
      }
docs: This function returns the file info from the request data.
  
  @param   request
  The HTTP request
  @param   queryStringMap
  The query string as key/value map
  @return  The file info