Link to home
Start Free TrialLog in
Avatar of Abdu_Allah
Abdu_Allah

asked on

How to display image that has UNC path!

Hi, I am trying to display image where its src parameter is UNC path like the following:
<img id="imgViewer" src="\\user-89dc945c9a\3\Download.gif" border="0" alt="Download.gif" >

But the image does not appear.

if src parameter does not accept UNC path what is the alternative to make this image appear?
Please help.
Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

Abdu_Allah,

You could map the drive on that computer so that it is assigned a drive letter.  Use that path instead of the UNC path.  The tag will support that.  One very big disadvantage of that method is any computer accessing the page would have to have the drive mapped to the same letter.

b0lsc0tt
I think you would be better off using a relative reference and keeping the image with the page.  For example you could store the image in the same directory as the page and just use...

<img id="imgViewer" src="Download.gif" border="0" alt="Download.gif" >

If you had a lot of images you could store it and the others in an images subfolder and use...

<img id="imgViewer" src="images\Download.gif" border="0" alt="Download.gif" >

Avatar of Abdu_Allah
Abdu_Allah

ASKER

No way I must use UNC path, I cannot place the images in a local drive.
try:

file:///server/share/path/file.ext
ASKER CERTIFIED SOLUTION
Avatar of nltech
nltech

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>  (worked in ie) (worked in ie, ff, and dw)

This method works just if you open the webpage from inside firewall, but it fails if you open it from outside firewall.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Havin_it  please read my question again and try to understand it.
Okay, I must be misunderstanding something.  I saw you said it must be a UNC path, but then you mentioned people "outside the firewall" being able to see it too - can you explain more about what you mean when you say this?  I took it to mean outside your local network (i.e. from the Internet) but perhaps you meant something else.  Making UNC paths available to machines across the Internet would be possible, but a colossal security risk.  That's why I though using a HTTP server might suit you better.

Anyway, sorry if I misinterpreted this.