Re: image.ServingURL not working

50 views
Skip to first unread message

Jose Vasconcellos

unread,
May 17, 2013, 5:39:49 PM5/17/13
to google-ap...@googlegroups.com

On Thursday, May 16, 2013 3:26:26 PM UTC-5, Jose Vasconcellos wrote:
Just started a new project. Using 1.8.0 and working fine on the local
development server. The problem is that on the production appengine,
image.ServingURL is not returning a valid a valid url; there are no errors
reported by the api call.

blob, err := blobstore.Stat(c, kb)
if err != nil { c.Errorf("Stat: %v",err); serveError(c, w, err); return }
url, err := image.ServingURL(c, blob.BlobKey, nil)
if err != nil { c.Errorf("ServeingURL: %v",err); serveError(c, w, err); return }

I've verified that the blobs exists through the blobstore viewer. For example, the go app
responds with a list of images that looks like this:

[["back-200x200.jpg","/2hwrtuHZ830X7dmS3MUd9Hz57m2wmwAqMkwi-con9SCkdoXBhZ3xDMaTaH5tPfLZrjHIlBxevgAsOKTUBSTqQOk"],["front-200x200.jpg","/cciRG-fmCR3hoGqtMc8PZ0pTDfZVSUv21N6WS5NJ1EleE9VXY8xLBASkDPhswFihimICDFSztVbsz0saaRceKPE"]]

on the development server it looks like this:

[["back-200x200.jpg","/_ah/img/ueNsp-HONVcLq7qpn_8z9Q=="],["front-200x200.jpg","/_ah/img/vBzgvM4xF_uksCvBy8m2Pw=="]]

I thought the URL generated should start with /_ah/img/ or have some /_ah/ prefix
but that doesn't seem to be the case on the appengine.

I must be missing something!

I should clarify that requests to the url are returning 404. Is there some
change that needs to be made to the app.yaml file? In  my current setup,
the routing looks like this:

- url: /.*
  script: _go_app
  secure: always

But I assume that appengine will handle these requests before it gets
to the application.

Andrew Gerrand

unread,
May 24, 2013, 12:30:22 AM5/24/13
to Jose Vasconcellos, google-appengine-go
You could try it without the "secure: always"? Although I don't see why that should be the problem.

Does it never work for any kind of image?



--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengin...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jose Vasconcellos

unread,
May 24, 2013, 8:12:33 AM5/24/13
to google-ap...@googlegroups.com
I've only tried jpeg files. My work around is to use the blobstore api to
serve the images. Removing the "secure: always" means serving mixed
content which I don't want to deal with.
Reply all
Reply to author
Forward
0 new messages