Commit 9e289cf8 authored by Sebastien Jourdain's avatar Sebastien Jourdain

Allow vtkWeb server to server several directories

parent 31dde7a7
......@@ -78,6 +78,8 @@ def add_arguments(parser):
help="If provided, disables the binary websocket endpoint for pushing images")
parser.add_argument("--no-lp-endpoint", action="store_true", dest='nolp',
help="If provided, disables the longpoll endpoint")
parser.add_argument("--fs-endpoints", default='', dest='fsEndpoints',
help="add another fs location to a specific endpoint (i.e: data:/Users/seb/Download|images:/Users/seb/Pictures)")
# Hook to extract any testing arguments we need
testing.add_arguments(parser)
......@@ -229,6 +231,11 @@ def start_webserver(options, protocol=vtk_wamp.ServerProtocol, disableLogging=Fa
uploadResource = UploadPage(options.uploadPath)
root.putChild("upload", uploadResource)
if len(options.fsEndpoints) > 3:
for fsResourceInfo in options.fsEndpoints.split('|'):
infoSplit = fsResourceInfo.split(':')
handle_complex_resource_path(infoSplit[0], root, File(infoSplit[1]))
site = Site(root)
if use_SSL:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment