# See COPYING file for copyrights details.
class ConnectorBase(object):
def BlobFromFile(self, filepath):
blobID = s.digest() # empty md5, to support empty blob
with open(filepath, "rb") as f:
chunk = f.read(self.chuncksize)
if len(chunk) == 0: return blobID
blobID = self.AppendChunkToBlob(chunk, blobID)
if blobID != s.digest(): return None