def gis_marker_retrieve(filename, path=None):
 if (not path):
  path = current.db.gis_marker.image.uploadfolder
 if ('/' in filename):
  (_path, filename) = filename.split('/')
  image = open(os.path.join(path, _path, filename), 'rb')
 else:
  image = open(os.path.join(path, filename), 'rb')
 return (filename, image)

def gis_marker_retrieve ( filename , path = None ) : if ( not path ) : path = current . db . gis_marker . image . uploadfolder if ( '/' in filename ) : ( _path , filename ) = filename . split ( '/' ) image = open ( os . path . join ( path , _path , filename ) , 'rb' ) else : image = open ( os . path . join ( path , filename ) , 'rb' ) return ( filename , image )
custom_retrieve to override web2py dals standard retrieve .