From 8d217d215fe23a11390666326b1c8f3eeeb032a4 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Mon, 17 Aug 2020 21:58:42 -0400 Subject: [PATCH] Better code fix for preview being more specific on the validation for the unresolvable relative path. checking now if the path start with "file:///~" instead of only: "file:/" This was too much restrictive since those direct path works and wouldn't return a preview: Ex: "file://MYSERVER/folder/100_0057.jpg" --- .../system/create/entityProperties/html/js/entityProperties.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/system/create/entityProperties/html/js/entityProperties.js b/scripts/system/create/entityProperties/html/js/entityProperties.js index 0b0a3a286a..f6dcf10bc8 100644 --- a/scripts/system/create/entityProperties/html/js/entityProperties.js +++ b/scripts/system/create/entityProperties/html/js/entityProperties.js @@ -2890,7 +2890,7 @@ function createTextureProperty(property, elProperty) { let imageLoad = function(url) { elDiv.style.display = null; - if (url.slice(0, 5).toLowerCase() === "atp:/" || url.slice(0, 6).toLowerCase() === "file:/") { + if (url.slice(0, 5).toLowerCase() === "atp:/" || url.slice(0, 9).toLowerCase() === "file:///~") { elImage.src = ""; elImage.style.display = "none"; elDiv.classList.remove("with-texture");