2
votes

I've got a fairly new site where I upload images using the blobstore and storing the url in my datastore model as an db.StringProperty().

When the file is uploaded I get the serving url with: image.imageUrl = images.get_serving_url(str(upload_files[0].key())) where image is my datastore model. I haven't modified the code for about 2 weeks and it's been working so far.

But all of the sudden all url's just returns 500 error when trying to open them.

The URL http://lh4.ggpht.com/JfA6nTibsx99EJ2TQoQZr5OVXhQUj_tJK0wCP3FJSRq9RhCzUFLAwsR1q0bzplmqRaRu6fTnNPqDFzpxzMMBeva9FJ9WRXdAqgA just returns 500 error.

Some what strange is that adding a resizing (adding =s720) param works:

http://lh4.ggpht.com/JfA6nTibsx99EJ2TQoQZr5OVXhQUj_tJK0wCP3FJSRq9RhCzUFLAwsR1q0bzplmqRaRu6fTnNPqDFzpxzMMBeva9FJ9WRXdAqgA=s720

Anyone encountered this? Sounds strange the a url would expire.

..fredrik

EDIT:

Reading the documentation I interpret that it should always be the same URL (am I wrong?):

The URL returned by this method is always public, but not guessable; private URLs are not currently supported. If you wish to stop serving the URL, delete the underlying blob key. This takes up to 24 hours to take effect.

1
Nothing, no error's. But that kinda makes sense since the images them self is not hosted on my application. - fredrik
I don't think that you need to call str(key) you can pass only the key. - Shay Erlichmen
Check the blobstore that the key is still there - Shay Erlichmen
I checked the blob view and all images are there. But there key doesn't match any part of the serving_url stored on upload. Do one need to store the key and then get a serving url for each request? - fredrik
You don't need to store the key, the key is only a pointer to the blob store. you might want to store the key in order to the delete the blob. - Shay Erlichmen

1 Answers

3
votes

Looks like the same issue as 3789: http://code.google.com/p/googleappengine/issues/detail?id=3789

Try appending =s1600.

1600 is the maximum size the high-performance can serve. Appending 1600 should get the native size, or 1600 -- which ever is smaller.