Store Images In Datastore Of Gae Python While Deploying Web2py App
I am trying to deploy a web2py application on GAE. When run locally, a phone_details table is defined in db.py using this line db.define_table('phone_details',Field('image',type='u
Solution 1:
Rather than defining the entity yourself on GAE, you can instead enable migrations, and web2py will automatically create entities for your models (you can disable migrations after the initial request that will create the entities).
You will find that on GAE, web2py will define an additional blob field associated with each upload field. In your case, it will generate a field called image_blob
where the actual file will be stored (it will store the filename in the image
field, which is just a string field).
If you want to create the entity on your own, define the image
field as a string type, and create an image_blob
field.
Post a Comment for "Store Images In Datastore Of Gae Python While Deploying Web2py App"