code: def get_attached_files(recid, comid):
      
      base_dir = os.path.join(CFG_COMMENTSDIR, str(recid), str(comid))
      if os.path.isdir(base_dir):
          filenames = os.listdir(base_dir)
          return [
              (
                  filename,
                  os.path.join(
                      CFG_COMMENTSDIR,
                      str(recid),
                      str(comid),
                      filename),
                  CFG_SITE_URL +
                  '/' +
                  CFG_SITE_RECORD +
                  '/' +
                  str(recid) +
                  '/comments/attachments/get/' +
                  str(comid) +
                  '/' +
                  filename) for filename in filenames]
      else:
          return []
docs: Returns a list with tuples (filename, filepath, fileurl)
  
      :param recid: the recid to which the comment belong
      :param comid: the commment id for which we want to retrieve files