From 0a8bf2c9e4720d4276add52cc46fc601f9ce228a Mon Sep 17 00:00:00 2001 From: Lukasz Biedrycki Date: Wed, 28 Aug 2013 18:00:54 +0200 Subject: [PATCH] after additional tests with actual s3: k.set_contents_from_string is working --- scrapy/contrib/pipeline/files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapy/contrib/pipeline/files.py b/scrapy/contrib/pipeline/files.py index b38a4c21b..f03bf69df 100644 --- a/scrapy/contrib/pipeline/files.py +++ b/scrapy/contrib/pipeline/files.py @@ -111,7 +111,7 @@ class S3FilesStore(object): if headers: h.update(headers) buf.seek(0) - return threads.deferToThread(k.set_contents_from_file, buf, + return threads.deferToThread(k.set_contents_from_string, buf.getvalue(), headers=h, policy=self.POLICY)