Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Local images on FF

Options
  • 21-01-2007 8:42pm
    #1
    Registered Users 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 Posts: 35,524 ✭✭✭✭Gordon


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


  • Registered Users Posts: 21,257 ✭✭✭✭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 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 Posts: 21,257 ✭✭✭✭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