thank you :D
and what about the method of creating a handler and then using the url
spec to invoke it:
what i want to do exactly is:
url specs:
(r"/{0}/".format(os.path.join(os.path.dirname(__file__), "users")),
handlers.PictureHandler),
class PictureHandler(BaseHandler):
def get(self,picture):
nofich = path.join(path.dirname(__file__), "users")
if nofich:
header = "image/jpeg"
self.add_header("Content-Type",header)
print nofich.read()
self.write(nofich.read())
this handler is never called!
what i try to accomplish is:
if by using chrome inspect i try to verify picture url, it is:
http://localhost:8000/G:/Myprojet/essog/users/abdelou...@yahoo.fr/135325895941-cat.jpg
and from windows it is:
file:///G:/Myprojet/essog/users/
abdelou...@yahoo.fr/135325895941-cat.jpg
and about access, if it is under a POSIX machines, it will not make
some restrictions of accessing the file, only tornado can get them,
since tornado is used by a SU no?
On 19 nov, 03:50, Jordon Mears <
jordo...@gmail.com> wrote:
> You can create you own static file handler and map the path in your
> application to allow a user to access their folder.
>
> application = tornado.web.Application([
> (r'/my-app/(.*)', tornado.web.StaticFileHandler,
> {path='/path/on/disk'}),
> ], **settings)
>
> Then each user could have their own folder inside your app.
>
> /path/on/disk/user1
> /path/on/disk/user2
>
> NOTE: These folders for each user are not secure and could be accessed by
> anyone.
>
> On Sun, Nov 18, 2012 at 4:16 PM, aliane abdelouahab <
alabdeloua...@gmail.com