equal
deleted
inserted
replaced
5 |
5 |
6 import md5 |
6 import md5 |
7 |
7 |
8 class ConnectorBase(object): |
8 class ConnectorBase(object): |
9 |
9 |
10 chuncksize = 16384 |
10 #chuncksize = 16384 |
|
11 chuncksize = 1024*1024 |
11 def BlobFromFile(self, filepath): |
12 def BlobFromFile(self, filepath): |
12 s = md5.new() |
13 s = md5.new() |
13 blobID = s.digest() # empty md5, to support empty blob |
14 blobID = s.digest() # empty md5, to support empty blob |
14 with open(filepath, "rb") as f: |
15 with open(filepath, "rb") as f: |
15 while True: |
16 while True: |