Here is exactly what I need: http://blog.notdot.net/2009/9/Handling-file-uploads-in-App-Engine
Also, to get width and height, scroll to somewhere in the middle: http://popcnt.org/2008/05/google-app-engine-tips.html On Aug 12, 6:38 pm, Backpack <[email protected]> wrote: > I just found BlobInfo contains all the properties I need: filename, > content_type and size, but... > > If I am not using the blobstore, is there a way to use the BlobInfo > without using the blobstore? > > Like blob=BlobInfo(self.request.get('file')) or something like that? > > Thanks > > On Aug 12, 12:23 pm, "Nick Johnson (Google)" <[email protected]> > wrote: > > > > > Hi, > > > On Wed, Aug 11, 2010 at 8:49 PM, Backpack <[email protected]> wrote: > > > I am going to store images in my app, so I'd like to know which is the > > > preferred way both in performance and quota/cost: blobstore or > > > blobproperty? > > > Both use equivalent amounts of quota. Blobstore is designed for storing and > > serving large files to users, while the datastore's BlobProperty is better > > suited for smaller values. If your files are less than 1MB, but they still > > fit the blobstore use case, it's up to you - pick whichever is most > > convenient. > > > > Size will never be over 1MB and I don't think I'll exceed 1GB per day. > > > The free storage quota is 1GB of storage - not 1GB per day! > > > > - I could use an Image entity to store them all. > > > - I could use a property of an entity, like avatar per user. > > > - I could use the blobstore and serve everything from there. > > > > Also would like to know about image caching using either method. > > > You can cache responses using a BlobProperty, but you can't cache the > > blobstore response yourself - you have to leave it up to Blobstore to do > > that, or not as it chooses. > > > > One last question, if we go the blobstore route, how to change the > > > key_name before or after inserting the image in the blobstore? > > > The blob key is determined by the blobstore. If you want to address it by > > another name, you need to store a BlobReferenceProperty in the datastore. > > > -Nick Johnson > > > > Thanks in advance. > > > > -- > > > 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]<google-appengine%2Bunsubscrib > > > [email protected]> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-appengine?hl=en. > > > -- > > Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: > > Registered in Dublin, Ireland, Registration Number: 368047 > > Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: > > 368047 -- 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.
