Javier Green
Javier Green

Reputation: 95

How to display an image located in another drive?

I have two drives:

What I want to do is to use the images in the other drive and be able to display them in my site in the other drive.

For example, I have an image called "flower.jpg" located in D: (D:/flower.jpg) and I want to use it in my site. I tried something like this (and as I thought, it doesn't work -- and again, the IIS is in C:):

<img src="D:/flower.jpg"></img>

I also tried with file:/ and file:/// and none worked too.

<img src="file:/D:/flower.jpg"></img>

How could I do it?

Upvotes: 0

Views: 181

Answers (1)

Niels
Niels

Reputation: 676

First of all, you can't use drive letters in your webserver. Everything is served from the root of the webserver (which is C:\inetpub I believe). You webserver only has access to that folder and should only have access to that folder.

If it's a limited space problem you're having, the easiest solution is moving your inetpub folder to you D: drive like so and place the images under that folder.

Upvotes: 1

Related Questions