Hello i want to know how to upload a picture from the user and store it in data base using this form ( using google data store)
<form method='post'>
<input type='file' name='img'>
<input type='submit'>
i have made a db model
from google.appengine.ext import db
class Photo(db.model):
profile_pic = db.BlobProperty()
and when i display it in the web app the name only appears
ex : example.png
i want to know how to upload it using
from google.appengine.ext import db
not
from google.appengine.ext import ndb
You can use the blobstore and a
BlobReferenceProperty
.Then you have an upload handler where you can add image using http post: