Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

after additional tests with actual s3: k.set_contents_from_string is working

Lukasz Biedrycki0a8bf2c9e472
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)