This question about Configuration: More info required

How to change default image path location

When I insert an image by browsing to a location on our network drive, say \\forbin\CADmgt\MKA_Hybrid\CADWiki\Graphics\MassMatchingSurface.png, it changes the HTML code to read: src=" http://10.20.1.48/pub/Sandbox/ImagePluginTest///forbin/CADmgt/MKACADD_Hybrid/CADWiki/Graphics/RampWallParapets/MassMatchingSurface.png." What do I need to change so that it simply looks where I tell it to look? Thanks, in advance, for your help.

-- PatrickPirtle - 31 May 2012

Patrick, that's simply not a valid url for an image. You need to specify an url where the browser can fetch it from the http server, not from some local drive accessible to your PC.

-- MichaelDaum - 01 Jun 2012

Michael -

Thanks for your reply. I think you may have misunderstood my question. However, please forgive me if I'm the one who is misunderstanding. Our forbin server is accessible from all of the PCs that will be accessing this wiki.

If I use Foswiki's editor's INSERT AN IMAGE tool, and type in the path which begins with \\forbin\CADmgt and then save my edits, I get a red X box indicating the image can't be found. If I re-edit the topic and look at the HTML code, the editor has automatically INSERTED " http://10.20.1.48/pub/Sandbox/ImagePluginTest/ " at the beginning of the path.

Now, if I edit the HTML code, remove this automatically-inserted stuff, and re-save the edits, then the image displays just fine on all of the PCs that will access the wiki. So, my question could be restated as: "Is there any way to configure the Foswiki editor so it doesn't automatically insert this stuff at the beginning of the image path?"

Again, MANY thanks for your help.

-- PatrickPirtle - 08 Jun 2012

I'm not sure if this will work in older versions of WysiwygPlugin and TinyMCE. Try entering the file location as file://forbin/CADmgt/MKA_Hybrid/CADWiki/Graphics/MassMatchingSurface.png At least with the current versions of the plugin, the file:// style URL is preserved. HTML typically uses the forward slash in the path, not backslash, which is interpreted as an escape. If this manually works in <img tag for you, then it might make it through the editor round-trip. file:// is the protocol prefix that tells HTML that the file is local to the system. The editor understands that prefix and should let it survive.

It's pretty unusual to put UNC names into HTML. It might work on your intranet, but it won't survive an Internet deployment.

Below this line is the uncname image.

UNC image

Digging around a bit. It required 5 slashes - file://///servername/.. And it will NOT work on Firefox by default as it's considered a security exposure. See http://kb.mozillazine.org/Links_to_local_pages_don%27t_work and also http://stackoverflow.com/questions/1369147/linking-a-unc-network-drive-on-an-html-page

-- GeorgeClark - 08 Jun 2012

QuestionForm edit

Subject Configuration
Extension
Version Foswiki 1.1.2
Status More info required
Related Topics
Topic revision: r4 - 08 Jun 2012, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy