beep.mp3 is loaded from wrong URL

Issue #88 resolved
dd1 created an issue

beep.mp3 should be loaded from the root url path, not from the current url path. I am looking at history plots (URLs .../HS/...) and I get these errors: [mhttpd.cxx:15412:open_resource_file,ERROR] Cannot find resource file 'HS/Default/beep.mp3' in ODB /Experiment/Resources, in $MIDASSYS/resources, in $MIDAS_DIR/resources or in local directory K.O.

Comments (4)

  1. Stefan Ritt

    The problem is that you are under .../HS/.... The JS code requests "beep.mp3", and the browser makes

    /HS/.../beep.mp3

    from this, which mhttpd cannot find of course since ../HS/.. is not part of the file system. For the moment, I temporarily fixed this by stripping the path in front of every .mp3 file. This means however that we cannot put mp3 files in real* subdirectories on our file system.

    The long term solution will be to give up any subdirectory URL like /CS, /HS, /SC, etc. and stay on a flat URL space, have one dynamic page for each of the subsystems and handle the differentiation of different history panels for example as a local variable of URL parameter, like http://host/history.html?panel=trigger

  2. Log in to comment