简体   繁体   English

从网络中的UNC路径加载图像并隐藏该路径

[英]Load image from an UNC path in network and hide the path

I am having some issue to load some images stocked in a server in my network. 我在加载网络中服务器中存储的某些图像时遇到问题。

From Windows Explorer, the path is something like this : 在Windows资源管理器中,路径如下所示:

 \\192.168.84.52\Distri\Affiche\10038P.jpg

I tried something like this : 我尝试过这样的事情:

<img src= "\\192.168.84.52\Distri\Affiche\10038P.jpg" alt="logo" />
<img src= "file://///192.168.84.52/Distri/Affiche/10038P.jpg" alt="logo" />

But it did not work. 但这没有用。 Another issue is that when someone try to see the url of the image, I would like it to not show the path 192.168.84.52 . 另一个问题是,当有人尝试查看图像的网址时,我希望它不显示路径192.168.84.52 Is it possible to use an aspx page and pass the image name so that it will load the image ? 是否可以使用aspx页面并传递图像名称,以便它将加载图像?

For exemple something like this 例如这样的事情

 image.aspx/10038P.jpg

Well yeah it is not really a parameter, 是的,这不是一个真正的参数,

I think that your best (and simplest) approach might to be to map a virtual directory using the UNC-type paths you have shown. 我认为最好(也是最简单)的方法可能是使用显示的UNC类型的路径映射虚拟目录。 Then you can address the files in your html in a more 'normal' way (effectively hiding the UNC server name as you've requested). 然后,您可以通过一种更“正常”的方式来处理html中的文件(按照您的要求有效地隐藏UNC服务器名称)。

You could, for instance, map UNC \\\\192.168.84.52\\Distri\\Affiche\\ to virtual folder images and then reference the image file names from folder images in your html. 例如,您可以将UNC \\\\192.168.84.52\\Distri\\Affiche\\映射到虚拟文件夹images ,然后从html中的文件夹images中引用图像文件名。

The following doc describes setting up virtual folders, please note the special instructions for UNC mappings. 以下文档介绍了如何设置虚拟文件夹,请注意UNC映射的特殊说明。

http://msdn.microsoft.com/en-us/library/bb763173(v=vs.100).aspx http://msdn.microsoft.com/en-us/library/bb763173(v=vs.100).aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM