I am developing a Google App Engine (Python) application and I have run into a bit of a problem. I have a video in my blobstore that I would like to serve in a <iframe>
tag, but I just can't get the source url to enter into the tag's "src" field. I have had some success using the image api for google app engine (specifically the get_serving_url(Blobkey) method where the Blobkey is known) and while that works on the development server, as soon as I roll out the application, I get the following error:
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/images/__init__.py", line 1794, in get_serving_url
return rpc.get_result()
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 613, in get_result
return self.__get_result_hook(self)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/images/__init__.py", line 1892, in get_serving_url_hook
raise _ToImagesError(e, readable_blob_key)
TransformationError
So my question is this: knowing the Blobkey of a video in my blobstore, how do I get the serving url to display the video in a <iframe>
tag?
Okay, I got it. I did a call from the website to the server and simply used
self.send_blob
to serve the video. So client side:and server side: