[web2py] Re: Obtaining URL to image blob in GAE

2012-03-07 Thread howesc
upload_image() is the originator of the request, and also the upload handler. it gets a URL from google that redirects to itself after image upload. blob_info = blobstore.parse_blob_info(request.vars.blob_key) gets the blob key from request.vars (where google puts it when calling the upload

[web2py] Re: Obtaining URL to image blob in GAE

2012-03-07 Thread Sushant Taneja
As available in the google documentation, we need a UploadHandler ? How it is achieved in the above code ? On Thursday, March 8, 2012 1:38:04 AM UTC+5:30, Sushant Taneja wrote: > > Hi, > > Can you explain some of the code like how and in which variable the > blob_key is saved after the image suc

[web2py] Re: Obtaining URL to image blob in GAE

2012-03-07 Thread Sushant Taneja
Hi, Can you explain some of the code like how and in which variable the blob_key is saved after the image successfully uploaded in the blobstore ? On Thursday, March 1, 2012 10:53:30 PM UTC+5:30, howesc wrote: > > my blobstore_image model: > > db.define_table('blobstore_image', >

[web2py] Re: Obtaining URL to image blob in GAE

2012-03-01 Thread howesc
my blobstore_image model: db.define_table('blobstore_image', db.version_info, Field('blob_key', 'upload', notnull=True, requires=IS_LENGTH(1048576), represent=lambda image : A('download', _href=URL( r=request, c='gae_blobstore', f='d

[web2py] Re: Obtaining URL to image blob in GAE

2012-02-29 Thread Peter G.
@Anthony & BrendanC: Thank you both for your code snippets! I've got it working now :). It's loading the image from a blob field in GAE's DB. @howesc: Can you possibly expand on how you modified your code to work with the blob store? That's something I'm also interested at looking into (would save

[web2py] Re: Obtaining URL to image blob in GAE

2012-02-27 Thread Anthony
> > If there's a better way here, plaese let me know. The following should > work for you: > > def show_image(): > """ > return image - this method is referenced from the view - see below > """ > if not request.args[0]: return None > id = request.args[0] > image=db(db

[web2py] Re: Obtaining URL to image blob in GAE

2012-02-27 Thread BrendanC
Peter, I was trying to get this to work last week and this is what finally worked for me. Here's a link to my earlier thread on the same topic. https://groups.google.com/forum/?fromgroups#!topic/web2py/1h3Nd3_T9Js In my case I'm storing small blobs in the table/model - although that's not the b

[web2py] Re: Obtaining URL to image blob in GAE

2012-02-27 Thread howesc
i'm using the blobstore so i can upload images larger than 1mb. because of that i have access to http://code.google.com/appengine/docs/python/images/functions.html#Image_get_serving_url which gives a URL that google serves up the image (and does not count against CPU for your app engine app).

[web2py] Re: Obtaining URL to image blob in GAE

2012-02-26 Thread Anthony
On Sunday, February 26, 2012 12:19:17 AM UTC-5, Peter G. wrote: > > How would one obtain the URL to a image blob stored on GAE's > datastore? A lot of the threads I've looked at were all for generating > an download output for views, but I need this for the Controller since > I'm returning this