You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# app not loaded via source(), env var not set, no reliable way to ascertain root path
717
+
warning("application not started via source(), and DASH_APP_PATH environment variable is undefined. get_asset_url returns NULL since root path cannot be reliably identified.")
718
+
return(NULL)
719
+
}
720
+
721
+
asset<- lapply(private$asset_map,
722
+
function(x) {
723
+
# asset_path should be prepended with the full app root & assets path
724
+
# if leading slash(es) present in asset_path, remove them before
725
+
# assembling full asset path
726
+
asset_path<- file.path(app_root_path,
727
+
private$assets_folder,
728
+
sub(pattern="^/+",
729
+
replacement="",
730
+
asset_path))
731
+
return(names(x[x==asset_path]))
732
+
}
733
+
)
734
+
asset<- unlist(asset, use.names=FALSE)
735
+
736
+
if (length(asset) ==0)
737
+
stop(sprintf("the asset path '%s' is not valid; please verify that this path exists within the '%s' directory.",
738
+
asset_path,
739
+
private$assets_folder))
740
+
741
+
# strip multiple slashes if present, since we'll
742
+
# introduce one when we concatenate the prefix and
743
+
# asset path & prepend the asset name with route prefix
0 commit comments