Question / Problem:
When I load an image into the DocumentViewer from a local drive, the image displays okay. However, when I try loading from a UNC path, no image is displayed. Is there a solution for this issue?
Answer / Solution:
There are two solutions:
1. Use a mapped drive letter path.
2. When a UNC path is detected, the back slashes need to be fully escaped:
would need to be fully escaped in this manner:
var foo = '\\barrdc\Atalasoft$\ttr-Winchester.png'
you could try using the global replace operator (g) as follows:
var bar = foo.replace(/\\/g, '\\\\');
which should produce the correct escaped path: