Thanks for helping. The  mentioned method appears to work getting the
id of another entity from the url, looking up the referenced blob and
writing it. . Now to make presentation more userfriendly, can we also
dispatch to templates for making views to blobstore? I had a custom
request handler for i18n translations that also can be done directly
in python files wanting to keep the template way since making the view
is easier with a template. For a view done with template, do we just
dispatch same way a class inheriting webapp.RequestHandler does this
time instead inheriting BlobstoreDownloadHandler?

On Aug 25, 5:55 am, Martin Ceperley <[email protected]> wrote:
> In that situation I would think that you would keep your Image class and add 
> references to the blobstore instead of the actual blob.
>
> In my model I store the reference and pre-generate the image serving url, 
> which you can append characters to to get various sizes:
>
>     primary_image = blobstore.BlobReferenceProperty()
>     primary_image_url = db.StringProperty()
>
> On Aug 24, 2010, at 11:11 PM, Niklasro(.appspot) wrote:
>
> > Thanks for this info. I've referenced imaged like below. Can I too
> > convert to blobstore somehow keeping the reference to model A?
>
> > class A(GeoModel,search.SearchableModel):
> > ...
> > class Image(db.Model):
>
> > reference=db.ReferenceProperty(Ad,collection_name='matched_images',verbose_name="Title")
> > ...
>
> > On Aug 23, 3:52 am, Martin Ceperley <[email protected]> wrote:
> >> Yea I just went through this process, it is a bit tricky but not too hard, 
> >> you can use a multipart POST library like 
> >> this:http://pipe.scs.fsu.edu/PostHandler/MultipartPostHandler.py
>
> >> to POST the image data to blobstore, and iterate through your models with 
> >> the mapreduce framework, then you'll need a callback handler once they are 
> >> posted.
>
> >> Faster images and auto-thumbnailing are definitely worth it! Let me know 
> >> if you need help.
>
> >> -Martin
>
> >> On Aug 22, 2010, at 4:27 PM, jorge wrote:
>
> >>> So the changes in 1.3.6 are very welcome, indeed.  In particular, the
> >>> high performance image serving is something I would like to leverage
> >>> immediately.  The app I built and have been maintaining has several
> >>> hundred images at this point.  Unfortunately, I started writing the
> >>> app long before the blobstore became available, so all of my images
> >>> are stored as raw bytes in a BlobProperty in the datastore.
>
> >>> You're probably beginning to see my problem.  I'd love to move all of
> >>> the images into the blobstore to take advantage of the new high
> >>> performance image serving.  Since access to the blobstore is not
> >>> directly exposed (that I know of), it seems to me the only way to do
> >>> this is to iterate through all the images in the datastore, generate a
> >>> blobstore URL for each and attempt to construct a POST request somehow
> >>> from the raw images bytes.  I don't even know if this is possible, or
> >>> how it will work.  In any event, it sounds pretty painful.  I'm
> >>> wondering if there is a suggested way to accomplish this.  I have a
> >>> few ideas but I'd like to hear others before I start on what seems to
> >>> be a fairly difficult task.
>
> >>> TIA
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups 
> >>> "Google App Engine" group.
> >>> To post to this group, send email to [email protected].
> >>> To unsubscribe from this group, send email to 
> >>> [email protected].
> >>> For more options, visit this group 
> >>> athttp://groups.google.com/group/google-appengine?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google App Engine" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to