Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   Opening a Local File using <a href="file:///../filename.doc">text</a>, posted by Terry Almond on Mon Jan 30 15:50:45 2017 
    icon2.gif   Re: Opening a Local File using <a href="file:///../filename.doc">text</a>, posted by Stefan Ritt on Mon Jan 30 16:47:31 2017 
       icon2.gif   Re: Opening a Local File using <a href="file:///../filename.doc">text</a>, posted by Terry Almond on Mon Jan 30 16:56:34 2017 
          icon2.gif   Re: Opening a Local File using <a href="file:///../filename.doc">text</a>, posted by Stefan Ritt on Mon Jan 30 17:45:18 2017 
             icon2.gif   Re: Opening a Local File using <a href="file:///../filename.doc">text</a>, posted by Terry Almond on Tue Jan 31 11:42:19 2017 
                icon2.gif   Re: Opening a Local File using <a href="file:///../filename.doc">text</a>, posted by Stefan Ritt on Tue Jan 31 12:46:30 2017 
    icon2.gif   Re: Opening a Local File using <a href="file:///../filename.doc">text</a>, posted by Andreas Luedeke on Tue Jan 31 08:18:05 2017 
Message ID: 68562     Entry time: Tue Jan 31 08:18:05 2017     In reply to: 68555
Icon: Reply  Author: Andreas Luedeke  Author Email: andreas.luedeke@psi.ch 
Category: Question  OS: Windows  ELOG Version: 2.8.1-2350 
Subject: Re: Opening a Local File using <a href="file:///../filename.doc">text</a> 

Hi Terry,

I'm not really sure I understand the question; I'll try to rephrase how I understood it.
You have loads of measurement data. All this data is stored not in ELOG but in a common drive M:.
When people work off-site, they copy the ELOG data and all the measurement data they need to a memory stick and run ELOG from there.
But the now copied links in ELOG still point to the M: drive, but they should instead now point to the local memory stick.
 
Did I understand that correctly?
It is a feature of the browser, that it does not allow a relative path in URLs with the "file:" protocol. Relative to what should it be? To where the browser has been started from? The browser does not know where ELOG resides.
 
If I understood the problem correctly, then I see several options:
 
1) Under Linux I would create a symblic link like "/mnt/measurementdata/" that points at work to "file:///M:/Data/" and off-site to the drive on the memory stick.
In the ELOG entries I would only use this symbolic link "/mnt/measurementdata/Inspection%20Reports/ABC123.doc".
This should somehow be possible with Windows, too. See e.g. https://msdn.microsoft.com/en-us/library/windows/desktop/aa363878%28v=vs.85%29.aspx . But I'm not a Windows expert.
 
2) You write a little "Copy ELOG and dataset" script, that will copy all desired files to the memory stick and changes all references to the copied datasets to the new location.
This is very easy to do for any programmer, since one need only do a text-search-and-replace on the ELOG text-files, like:
replace "file:///M:/Data/" with ""file:///F:/Data/" in all *a.log.
 
3) You might even convince Windows to mount your memory stick as drive "M:".  Just copy then the full path to the memory stick: problem solved!
Drive "M:" will rarely ever be defined already on your remote computer. I know that this was possible with Windows NT, I have no idea if this works with Windows 10. Ask google ;-)
 
I hope that helped?
Cheers, Andreas
 
Terry Almond wrote:

I've created an elog where users can then enter links to a file: for example they would enter:

<a href="file:///M:/Data/Inspection%20Reports/ABC123.doc">ABC123</a>

If they are running this on their desktops where everyones M drive is mapped to the same location, not a problem, the file opens perfectly.

The problem we have is some people work off of site and hence they run everything from a memory stick (USB drive), then once back in the office, copy the memory stick back on to the network.

Unfortunately when off of site the href link M: is no longer valid as the M drive doesn't exist.

Hence i've been trying to open a local file with the following syntax: 

<a href="file:///../ABC123.doc">ABC123</a>

It just won't open

Hence in my frustration i basically copied the word file ABC123.doc into every single directory on the memory stick thinking surely this must work, it must find it somewhere, unfortunately not.

What am i doing wrong?

 

 

ELOG V3.1.5-3fb85fa6