Example #1
0
 def process_one(self, item):
     item.url = posixpath.join(self.prefix, item.filename)
     if self.bust:
         with item.data.open() as stream:
             item.url += '?' + md5stream(stream)[:8]
     return item
Example #2
0
 def _md5(self, item):
     """ md5sum a file """
     with item.data.open() as filestream:
         return md5stream(filestream)