App Engine - Save response from an API in the data store as file (blob)
Posted
by herrherr
on Stack Overflow
See other posts from Stack Overflow
or by herrherr
Published on 2010-05-29T17:11:15Z
Indexed on
2010/05/29
18:52 UTC
Read the original article
Hit count: 193
Hi there,
I'm banging my head against the wall with this one:
What I want to do is store a file that is returned from an API in the data store as a blob.
Here is the code that I use on my local machine (which of course works due to an existing file system):
client.convertHtml(html, open('html.pdf', 'wb'))
Since I cannot write to a file on App Engine I tried several ways to store the response, without success. Any hints on how to do this? I was trying to do it with StringIO and managed to store the response but then weren't able to store it as a blob in the data store.
Thanks, Chris
© Stack Overflow or respective owner