Reputation: 11
i can upload a file using uploadhandler in python.while i am trying to get the url of the file i am getting error as "Assertionerror images the service doesn't hve CreateRbc method() please help me
class ServeHandler(blobstore_handlers.BlobstoreDownloadHandler):
def get(self, blob_info):
blob_info = images.get_serving_url(blob_info)
self.get_serving_url(blob_info)
Upvotes: 1
Views: 152
Reputation: 21835
From what I understood you are a bit confused on what is what.
The get_serving_url()
takes as a parameter a blob_key
and not a blob_info
and returns a String, which is a URL for a particular image with some extra goodies that you can add in the end of that URL (=s512-c or =s256).
The ServeHandler
that you have in your snippet is an attempt to create a general serving handler for any Blob I would guess, but still is totally broken from many points. I would strongly suggest you to go through the overview, where you can see a fully working example on how to upload and serve files using Google App Engine, to begin with.
Upvotes: 3