diff --git a/interface/src/scripting/TestScriptingInterface.cpp b/interface/src/scripting/TestScriptingInterface.cpp index fc17d4c978..53630b3eed 100644 --- a/interface/src/scripting/TestScriptingInterface.cpp +++ b/interface/src/scripting/TestScriptingInterface.cpp @@ -68,7 +68,7 @@ bool TestScriptingInterface::loadTestScene(QString scene) { } static const QString TEST_ROOT = "https://raw.githubusercontent.com/hifi-archive/hifi_tests/master/"; - static const QString TEST_BINARY_ROOT = NetworkingConstants::HF_CONTENT_CDN_URL + "/test_scene_data/"; + static const QString TEST_BINARY_ROOT = NetworkingConstants::HF_CONTENT_CDN_URL + "test_scene_data/"; static const QString TEST_SCRIPTS_ROOT = TEST_ROOT + "scripts/"; static const QString TEST_SCENES_ROOT = TEST_ROOT + "scenes/"; diff --git a/libraries/networking/src/NetworkingConstants.h b/libraries/networking/src/NetworkingConstants.h index 533b5ccca4..0766965a44 100644 --- a/libraries/networking/src/NetworkingConstants.h +++ b/libraries/networking/src/NetworkingConstants.h @@ -45,11 +45,11 @@ namespace NetworkingConstants { const QUrl MASTER_BUILDS_XML_URL("https://highfidelity.com/dev-builds.xml"); // CDN URLs - const QString HF_CONTENT_CDN_URL = "https://cdn-1.vircadia.com/eu-c-1/vircadia-content"; - const QString HF_MPASSETS_CDN_URL = "https://cdn-1.vircadia.com/eu-c-1/vircadia-mpassets"; - const QString HF_PUBLIC_CDN_URL = "https://cdn-1.vircadia.com/eu-c-1/vircadia-public"; + const QString HF_CONTENT_CDN_URL = "https://cdn-1.vircadia.com/eu-c-1/vircadia-content/"; + const QString HF_MPASSETS_CDN_URL = "https://cdn-1.vircadia.com/eu-c-1/vircadia-mpassets/"; + const QString HF_PUBLIC_CDN_URL = "https://cdn-1.vircadia.com/eu-c-1/vircadia-public/"; const QString HF_MARKETPLACE_CDN_HOSTNAME = "mpassets.highfidelity.com"; - const QString VIRCADIA_CONTENT_CDN_URL = "https://cdn-1.vircadia.com/us-e-1"; + const QString VIRCADIA_CONTENT_CDN_URL = "https://cdn-1.vircadia.com/us-e-1/"; #if USE_STABLE_GLOBAL_SERVICES const QString ICE_SERVER_DEFAULT_HOSTNAME = "ice.vircadia.com"; diff --git a/libraries/script-engine/src/ScriptEngine.cpp b/libraries/script-engine/src/ScriptEngine.cpp index fe3bccd543..184d0bebd2 100644 --- a/libraries/script-engine/src/ScriptEngine.cpp +++ b/libraries/script-engine/src/ScriptEngine.cpp @@ -2883,6 +2883,6 @@ void ScriptEngine::callEntityScriptMethod(const EntityItemID& entityID, const QS } } -QString ScriptEngine::getExternalPath(ExternalResource::Bucket bucket, const QString& relativePath) { - return ExternalResource::getInstance()->getUrl(bucket, relativePath); +QString ScriptEngine::getExternalPath(ExternalResource::Bucket bucket, const QString& path) { + return ExternalResource::getInstance()->getUrl(bucket, path); } diff --git a/libraries/script-engine/src/ScriptEngine.h b/libraries/script-engine/src/ScriptEngine.h index 07b37b992b..8eeb72e658 100644 --- a/libraries/script-engine/src/ScriptEngine.h +++ b/libraries/script-engine/src/ScriptEngine.h @@ -690,12 +690,18 @@ public: * but this method will return the asset's current URL.) * @function Script.getExternalPath * @param {Script.ResourceBucket} bucket - The external resource bucket that the asset is in. - * @param {string} relativePath - The path within the external resource bucket where the asset is located. + * @param {string} path - The path within the external resource bucket where the asset is located. + *
Normally, this should start with a path or filename to be appended to the bucket URL.
+ * Alternatively, it can be a relative path starting with ./
or ../
, to navigate within the
+ * resource bucket's URL. Or it can be an absolute path starting with /
, in which case the bucket's path
+ * is discarded when calculating the asset's URL.