Hi Massimiliano, On Mon, Jun 21, 2010 at 8:55 AM, Massimiliano < massimiliano.pietr...@gmail.com> wrote:
> Hi Nick, > I have checked all the documentations: > > 1. When I try to store the blob key in the IMG DB EXAPANDO, the app reach > the upload, but it seems to have problem before the self.redirect. I suppose > I can't do it here, but where can I do it? And how? > What problem? It's impossible to suggest a fix without knowing what problem you're encountering. > > class ImgHandler(blobstore_handlers.BlobstoreUploadHandler): > def post(self): > upload_files = self.get_uploads('img') > self.redirect('/') > > 2. Is there way to store a link to the imagine stored in the blobstore? I > want to pass to the web framework just a link to the blobstore. > Please see the second link I provided. You can store blob keys in the datastore using the BlobReferenceProperty. -Nick Johnson > > {% for img in immagini %} > <img src="/serve/{{ img.link }}" /> > {% endfor %} > > In my understanding I have always to have a link to the app that will > elaborate everything. Right? > > Thanks > > Max > > > > > 2010/6/21 Nick Johnson (Google) <nick.john...@google.com> > > Hi Massimiliano, >> >> Have you examined the example app in the documentation? This provides most >> of what you need: >> http://code.google.com/appengine/docs/python/blobstore/overview.html#Complete_Sample_App >> >> The BlobRerefenceProperty provides the property you need to store a blob >> key in the datastore: >> http://code.google.com/appengine/docs/python/datastore/typesandpropertyclasses.html#BlobReferenceProperty >> >> -Nick Johnson >> >> On Sun, Jun 20, 2010 at 9:41 PM, Massimiliano < >> massimiliano.pietr...@gmail.com> wrote: >> >>> Hi all, >>> I can't understand the Blobstore. I have the lines below and I can upload >>> files in the Blobstore: >>> >>> class ImgHandler(blobstore_handlers.BlobstoreUploadHandler): >>> def post(self): >>> upload_files = self.get_uploads('img') >>> self.redirect('/') >>> >>> Now I'm trying to show it to my users. How can I do it? I can't >>> understand the Appengine Guide. >>> >>> I want to store a link to the image in the datastore in a DB Expando in >>> order to have all in one place (link to the image,user name,...): >>> >>> class IMG(db.Expando): >>> Date = db.DateTimeProperty(auto_now_add=True) >>> >>> In the HTML I want to have something like that: >>> >>> {% for img in immagini %} >>> <img src="/serve/{{ img.link }}" /> >>> {% endfor %} >>> >>> >>> Can someone help me? >>> >>> Regards >>> >>> Massimiliano >>> >>> >>> -- >>> >>> My email: massimiliano.pietr...@gmail.com >>> My Google Wave: massimiliano.pietr...@googlewave.com >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Google App Engine" group. >>> To post to this group, send email to google-appeng...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com> >>> . >>> 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 google-appeng...@googlegroups.com. >> To unsubscribe from this group, send email to >> google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/google-appengine?hl=en. >> > > > > -- > > My email: massimiliano.pietr...@gmail.com > My Google Wave: massimiliano.pietr...@googlewave.com > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to google-appeng...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com> > . > 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 google-appeng...@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.