was not able to use open to open a binary file.... so what I did was use urlfetch to fetch the image for me and read the content into BlobProperty() Not sure why it took me so long to figure this out. Hope it helps someone. thx<br>
<br> def post(self,key):<br> k=db.get(key)<br> img=images.Image(urlfetch.Fetch("<a href="http://www.example.com/">http://www.example.com/</a>"+k.image).content)<br> img.rotate(90)<br> jpg_data= img.execute_transforms(images.JPEG)<br>
k.image_blob=jpg_data<br> k.put()<br><br clear="all">-Alex Goretoy<br><a href="http://www.goretoy.com">http://www.goretoy.com</a><br><br>
<br><br><div class="gmail_quote">On Mon, Feb 9, 2009 at 11:07 AM, alex goretoy <span dir="ltr"><<a href="mailto:aleksandr.goretoy@gmail.com">aleksandr.goretoy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
How to read Binary file into GAE(Google App Engine) db.BlobProperty() datastore?<br><font color="#888888"> <br clear="all">-Alex Goretoy<br><a href="http://www.goretoy.com" target="_blank">http://www.goretoy.com</a><br><br>
</font></blockquote></div><br>