Loading Files in AppEngine
- by Chris M
I've got a tiny bit of code to display a file
in app.yaml
- url: /(.*\.(gif|png|jpg))
static_files: static/\1
upload: static/(.*\.(gif|png|jpg))
in main.py
...
class ShowImage(webapp.RequestHandler):
def get(self):
rootpath = os.path.dirname(__file__)
file = rootpath + "/static/tracker.gif";
fh=open(file, 'r')
…