Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Local images on FF

  • 21-01-2007 08:42PM
    #1
    Registered Users, Registered Users 2 Posts: 4,475 ✭✭✭


    I'm developing a site and as part of it, I'm uploading images using a homegrown php uploader. It saves my images to a certain directory, in this case c:\myimages\. This works fine on the upload, but only IE shows the resulting image when working on http://localhost/. FF doesn't seem to even bother looking for the image, as if it doesn't even recognise "c:\myimages" as a valid web address?

    I've tried c:\myimages, c:\\myimages, c:/myimages. All to no avail. Do I really need to move this directory inside my localhost directory structure before FF will recognise it? It's not that difficult, but I'm surprised by how finicky FF is (or I guess, how forgiving IE is)


Comments

  • Registered Users, Registered Users 2 Posts: 35,522 ✭✭✭✭Gordon


    Try opening the image with FF. On my Mac the code is:
    file:///Users/gordon/image.jpg


  • Registered Users, Registered Users 2 Posts: 21,278 ✭✭✭✭Eoin


    This is a security measure, which IE7 also seems to carry out now also. I opened up a local image using the "File -> Open" dialog, and the resulting address was:
    file:///C:/Inetpub/wwwroot/images/BannerAd.gif. But when I used this in am <img> tag, it wouldn't work.

    Firefox is pretty customisable though, so if you check out this link, you may get some info on how to override this (changing the about:config alone didn't work for me though).

    Edit:

    Search your installation directory for "all.js" and add the following lines to the file:
    pref("capability.policy.policynames", "localfilelinks");
    pref("capability.policy.localfilelinks.sites", "http://localhost");
    pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");
    


  • Registered Users, Registered Users 2 Posts: 4,475 ✭✭✭corblimey


    Thanks, eoin, but that didn't appear to make any difference to me. If it's a security issue and IE is just coming around to it, I guess I should just get into the habit of putting my upload directory within the localhost directory schema, just solve ALL my problems.


  • Registered Users, Registered Users 2 Posts: 21,278 ✭✭✭✭Eoin


    corblimey wrote:
    Thanks, eoin, but that didn't appear to make any difference to me. If it's a security issue and IE is just coming around to it, I guess I should just get into the habit of putting my upload directory within the localhost directory schema, just solve ALL my problems.

    Yeah, that's probably the easiest - though the change above did work for me. I presume you restarted your browser?

    I think the security issue is to stop local executables (e.g. a command prompt) being invoked.


Advertisement