code: private UploadFile getUploadFileFromSession(HttpServletRequest request,
                                                String id) {
      UploadFile uploadFile = null;
      boolean found = false;
      try {
        HttpSession session = request.getSession(true);
        Collection uploadList = (Collection) session.getAttribute(PIC_NAME_PACKAGE);
        if (uploadList == null)
          return null;
        Iterator iter = uploadList.iterator();
        while (iter.hasNext()) {
          uploadFile = (UploadFile) iter.next();
          if (uploadFile.getId().equals(id)){
            found = true;
            break;
          }else if (uploadFile.getTempId().equals(id)){
            found = true;
            break;
          }
        }
        if (!found )  uploadFile = null;
      } catch (Exception ex) {
        Debug.logError("[JdonFramework] getUploadFileSession error" + ex, module);
  
      }
      return uploadFile;
  
    }
docs: 根据UploadFile的id获得UploadFile实例
  @param request
  @param id
  @return