I do understand this, but my html is:
<img src="/serve/{{ elemento.link }}" width="10%"/><br></a>
How have I to modify the html?
I tried with an Iframe, but doesn't work.
class UploadHandler(blobstore_handlers.BlobstoreUploadHandler):
def post(self):
upload_files = self.get_uploads('File')
blob_info = upload_files[0]
self.request.get('Nick')
frasi = FRASI()
frasi.frase = self.request.get('Frase')
frasi.gruppo = self.request.get('domain')
frasi.link = blob_info.key()
frasi.put()
self.redirect("/" + self.request.get('domain') + "/fanpage")
class ServeHandler(webapp.RequestHandler):
def get(self, resource):
self.response.headers['Content-Type'] = "image/png"
self.response.out.write(images.get_serving_url(resource, 32))
2010/10/27 Barry Hunter <[email protected]>
> get_serving_url is a URL to the file directly - you use it in the
> actual image tag.
>
> self.response.out.write('<img src="%s"/>'%images.get_serving_url(resource,
> 32))
>
>
>
> On 27 October 2010 19:28, Massimiliano <[email protected]>
> wrote:
> > I'm trying to serve the images with this code, but it's not working
> > class ServeHandler(webapp.RequestHandler):
> > def get(self, resource):
> > self.response.headers['Content-Type'] = "image/png"
> > self.response.out.write(images.get_serving_url(resource, 32))
> > Could you help me?
> > 2010/10/27 Massimiliano <[email protected]>
> >>
> >> I have understand very well the Stephen solution. I'm just fighting with
> >> the serve part of the code...
> >>
> >> 2010/10/27 ego008 <[email protected]>
> >>>
> >>> you can do it step by step here
> >>>
> >>>
> http://code.google.com/intl/en/appengine/docs/python/images/usingimages.html
> >>>
> >>> GAE Geek http://gaefons.appspot.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 [email protected]
> .
> >>> To unsubscribe from this group, send email to
> >>> [email protected]<google-appengine%[email protected]>
> .
> >>> For more options, visit this group at
> >>> http://groups.google.com/group/google-appengine?hl=en.
> >>
> >>
> >>
> >> --
> >>
> >> My email: [email protected]
> >> My Google Wave: [email protected]
> >
> >
> >
> > --
> >
> > My email: [email protected]
> > My Google Wave: [email protected]
> >
> > --
> > 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%[email protected]>
> .
> > For more options, visit this group at
> > http://groups.google.com/group/google-appengine?hl=en.
> >
>
> --
> 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%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>
--
My email: [email protected]
My Google Wave: [email protected]
--
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.