diff --git a/tinyfilemanager.php b/tinyfilemanager.php
index efc3ce6..22950d5 100644
--- a/tinyfilemanager.php
+++ b/tinyfilemanager.php
@@ -66,6 +66,12 @@ $root_path = $_SERVER['DOCUMENT_ROOT'];
// Will not working if $root_path will be outside of server document root
$root_url = '';
+// Static ressource URL used only for direct links
+// comes in handy if fm handles files that are public, but on a different URL
+// gives users a copy&paste able direct link they can use
+// eg. https://example.org/foo/file.png where fm is hosted on https://backend.example.org/files/index.php
+$static_url = '';
+
// Server hostname. Can set manually if wrong
// $_SERVER['HTTP_HOST'].'/folder'
$http_host = $_SERVER['HTTP_HOST'];
@@ -271,6 +277,10 @@ $root_url = fm_clean_path($root_url);
defined('FM_ROOT_URL') || define('FM_ROOT_URL', ($is_https ? 'https' : 'http') . '://' . $http_host . (!empty($root_url) ? '/' . $root_url : ''));
defined('FM_SELF_URL') || define('FM_SELF_URL', ($is_https ? 'https' : 'http') . '://' . $http_host . $_SERVER['PHP_SELF']);
+// only used to directly link to ressources
+//$static_url = fm_clean_path($static_url);
+defined('FM_STATIC_URL') || define('FM_STATIC_URL', !empty($static_url) ? $static_url : $FM_ROOT_URL);
+
// logout
if (isset($_GET['logout'])) {
unset($_SESSION[FM_SESSION_ID]['logged']);
@@ -2113,7 +2123,7 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white
-
+
..."
href="?p=©=">
-
+