Page 1 of 1

Using local images...

Posted: Tue Dec 04, 2007 4:37 pm
by alex.barylski
Edit: I've already looked into IE security options for local intranet...couldn't find anything so please be specific. :)

I'm sure I've done this - mind you this was years ago (5+) so security may have changed since then... :(

I'm trying to use a local image in my web application:

Code: Select all

<img src="C:\Documents and Settings\Alex\Desktop\some-logo.gif" />
The web page is currently hosted on localhost...I figured for sure I would be sprung with that annoying warning IE throws at you...but instead it just doesn't work...I'm not given any warning...in FireFox or IE...

Anybody know if this is configurable somehow?

Posted: Tue Dec 04, 2007 4:41 pm
by VladSun
file://

Posted: Tue Dec 04, 2007 4:43 pm
by alex.barylski
I was just going to say...I tried that...no luck :(

I've searched high and dry in both IE and FF options and there seems nothing I can do...sadly.

It made for a really cool image upload preview before uploading feature on an old web site I built in 2000ish...thankfully that site no longer exists as the upload preview functionality would be broken... :)

Any other ideas?

Posted: Tue Dec 04, 2007 4:46 pm
by VladSun
Do you PHP echo it?

Posted: Tue Dec 04, 2007 5:12 pm
by alex.barylski
Initially yes...

The I hardcoded the actual path:

Code: Select all

file://C:\Documents and Settings\Alex\Desktop\filelist.png
I tried reversing the slashes in the path and everything...nothing worked...not even when put inside an anchor...I"m guessing latest browsers IE6/7 and FF2+ simply don't want you to directly access files on local machines...smart move I suppose...

Have you had success accessing files on a remote machine from localhost?

Posted: Tue Dec 04, 2007 5:21 pm
by VladSun
Sorry, I thought you want to open local files from local machine...
I don't think you can achieve what you want.

Posted: Tue Dec 04, 2007 5:34 pm
by alex.barylski
VladSun wrote:Sorry, I thought you want to open local files from local machine...
I don't think you can achieve what you want.
Hey it's good man... :D

Thanks anyways. :)