hi,
i have a question regarding webpys built-in static-dir delivery-
mechanisms. It works very well / very fast, compared to a script-based
delivery like the one below.
now, i want to combine the speed of the static-dir delivery with an
authentication mechanism that tests for the correct user before
serving a file.
how would you do that?
class img(app.page):
path = "/img/(.*)/(.*)"
def GET(self,id,size):
if not user: return 'not authorized'
web.header('Content-type','image/jpeg')
img = open(filename,'rb')
data = img.read()
img.close()
return data
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---