views:

250

answers:

1

I am going through the various Google AppEngine tutorials sometimes, and I just noticed something odd in a StackOverflow question about favicon.ico - specifically this question: http://stackoverflow.com/questions/887328/favicon-ico-not-found-error-in-app-engine

- url: /favicon.ico
static_files: media/img/favicon.ico
upload: media/img/favicon.ico

- url: /robots.txt
static_files: media/robots.txt
upload: media/robots.txt

All of the posters included an "upload:" line in their app.yaml definitions The application appears to work the same with or without the upload: line, and I have not seen any mention of it in the official documentation.

Where is it used, or what difference does it make if this line is included or not?

+1  A: 

It's documented over here: http://code.google.com/appengine/docs/python/config/appconfig.html#Static_File_Handlers . It's basically a regular expression that identifies the files handled by the mapper. It's required for static file handlers.

hwiechers
Actually, it's always required for static_files handlers - the SDK doesn't attempt to figure out if your regex is 'simple' enough.
Nick Johnson
You're right. I just tried appcfg and the dev server and they both don't work if it isn't provided. I was sure it wasn't required for simple paths, but I was wrong.
hwiechers
Updated answer.
hwiechers