Skip to content

Commit 6a5bef2

Browse files
committed
move buffer pointing to start of file before computing checksum. refs scrapy#92
1 parent 9817df1 commit 6a5bef2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scrapy/contrib/pipeline/images.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ def image_downloaded(self, response, request, info):
252252
checksum = None
253253
for key, image, buf in self.get_images(response, request, info):
254254
if checksum is None:
255+
buf.seek(0)
255256
checksum = md5sum(buf)
256257
self.store.persist_image(key, image, buf, info)
257258
return checksum

0 commit comments

Comments
 (0)