[google-appengine] Re: Cloud SQL Blobstore Simultaneously -- good way to handle Django image uploads?

2013-03-13 Thread Chris
Hi KScott,

Do you have one example of upload images resize these and save in cloud 
sql? thank you very much

El domingo, 26 de agosto de 2012 04:10:32 UTC+2, seafangs escribió:

 Hello,

 I'm new to GAE (and this forum), please forgive any ignorance on my part. 
 I've been searching around to find out what the best practice is, to allow 
 users to upload images using Django on GAE. The clincher is that I want to 
 use Cloud SQL.

 I see that the docs recommend the Blobstore as the place to store images. 
 I understand that I am also able to store images in a Cloud SQL MEDIUMBLOB 
 (or equivalent) field (or even in a TextField in a binary form). However I 
 also understand that the latter approaches -- storing it into a MEDIUMBLOB 
 or as binary data -- are advised against.

 So that brings me back to storing it in the Blobstore. But will I be able 
 to use the Blobstore and Cloud SQL in the same GAE environment? I got the 
 impression that the Datastore and Cloud SQL were more or less alternatives 
 to each other. But I also get the impression that Blobstore is separate, in 
 some sense, from the normal Datastore.

 Can anyone offer me any guidance on a best approach?



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[google-appengine] Re: Cloud SQL Blobstore Simultaneously -- good way to handle Django image uploads?

2012-09-09 Thread kscott
I use the blobstore to upload images to my application. 

After they are uploaded:

   - verify it a valid image 
   - convert to jpg
   - resize the image to 1 meg
   - create a thumbnail image store it in another table
   - put it in data store column(db.BlobProperty() )
   - delete the blobstore since I do not need it anymore
   
If you use the datastore be sure to only store one blob in a table per 
key.  If you do the following performance and scalability will suffer.
 

 class ImageStore(db.Model):
 thumbId=db.IntegerProperty()

   image=db.BlobProperty()

thumbnail=db.BlobProperty()


Check out my app: http:// www.hikejournal.com



On Saturday, August 25, 2012 9:10:32 PM UTC-5, seafangs wrote:

 Hello,

 I'm new to GAE (and this forum), please forgive any ignorance on my part. 
 I've been searching around to find out what the best practice is, to allow 
 users to upload images using Django on GAE. The clincher is that I want to 
 use Cloud SQL.

 I see that the docs recommend the Blobstore as the place to store images. 
 I understand that I am also able to store images in a Cloud SQL MEDIUMBLOB 
 (or equivalent) field (or even in a TextField in a binary form). However I 
 also understand that the latter approaches -- storing it into a MEDIUMBLOB 
 or as binary data -- are advised against.

 So that brings me back to storing it in the Blobstore. But will I be able 
 to use the Blobstore and Cloud SQL in the same GAE environment? I got the 
 impression that the Datastore and Cloud SQL were more or less alternatives 
 to each other. But I also get the impression that Blobstore is separate, in 
 some sense, from the normal Datastore.

 Can anyone offer me any guidance on a best approach?



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/iWlu79nnIS4J.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.