What is the way in JS to obtain the current project's File Root path?

LabKey Support Forum (Inactive)
What is the way in JS to obtain the current project's File Root path? Leo Dashevskiy  2013-03-26 15:32
Status: Closed
 
 
Anthony Corbett responded:  2013-03-27 14:02
Give LABKEY.Pipeline.getPipelineContainer() a try: https://www.labkey.org/download/clientapi_docs/javascript-api/symbols/LABKEY.Pipeline.html#.getPipelineContainer

States that it gets the container in which the pipeline for this container is defined.

Running the following in firebug:

LABKEY.Pipeline.getPipelineContainer({
  containerPath: 'home',
  success: function(resp){ console.log(resp) },
  failure: console.log
})
    
will output a resp object that contains:

{
  containerPath: "/home",
  webDavURL: "/labkey/_webdav/home/%40files/"
}

The webDavURL property is what you might be looking for (at least you can transform that string into what you need).

Cheers,
Anthony Corbett
 
Leo Dashevskiy responded:  2013-03-27 14:07
Thanks, Anthony!

This is useful to know - we might be working with pipelines later. Though, not now, so not sure if it will work. Meanwhile, came up with a largest common substring of the FCS files' paths approach that seems to work...

-Leo