# getBaseUri

engine/Source/Core/getBaseUri.js 20
Given a URI, returns the base path of the URI.

##### Example:

    // basePath will be "/Gallery/";
    const basePath = Cesium.getBaseUri('/Gallery/simple.czml?value=true&example=false');

    // basePath will be "/Gallery/?value=true&example=false";
    const basePath = Cesium.getBaseUri('/Gallery/simple.czml?value=true&example=false', true);

Need help? The fastest way to get answers is from the community and team on the Cesium Forum.