That's good to know!
My files are pretty big right now, so I'm going to go with a stream
method. Pretty basic function, but here it is anyways for reference:
@auth.requires_login()
def loadLevel():
path=os.path.join(request.folder,'loadLevel',request.args[0])
return response.stream(open(path,'rb'),chunk_size=1024)
On Apr 6, 11:33 pm, Massimo Di Pierro <[email protected]>
wrote:
> Looks like a good solution to me.
>
> On Apr 6, 8:44 pm, Charles Law <[email protected]> wrote:
>
>
>
>
>
>
>
> > I have a Pyjamas app that requires authorized access, which calls
> > several cache files. I want to protect the cache files too, but
> > they're in the static dir. Is there a simple way to do this?
>
> > Currently I am planning on creating a function that requires
> > authorization that will load the cache files from a special directory,
> > basically like the download() function.
> > Thanks!