Esri / geoportal-server

Geoportal Server is a standards-based, open source product that enables discovery and use of geospatial resources including data and services.
https://gptogc.esri.com/geoportal
Apache License 2.0
244 stars 149 forks source link

"Open" link not showing up - network files #230

Open MapZombie opened 8 years ago

MapZombie commented 8 years ago

We are having an issue where the "Open" link is not showing up for files unless they originate from Map Services. These files are being indexed correctly by Geoportal. Are we missing a setting change in this case? One other difference is that the files are hosted on the network and not through a website. Please see below. We have followed the instructions on https://github.com/Esri/geoportal-server/wiki/Add-Custom-Link-to-a-Search-Result

image image image image

Thanks in advanced for your help

MapZombie commented 8 years ago

Further investigation and it would it appear if the Distribution > Online > URL is set to something other than http:// the "Open" link does not appear. Where would we be able to change this so that local content or UNC path content can be opened?

mhogeweg commented 8 years ago

opening a file on a UNC path from a browser is not generally supported. think about it like this. a user on the internet may not have access to the UNC path referenced in the metadata. Instead of UNC path, use a URL and make the folder web accessible (simple action in IIS or Apache HTTP servers). this also allows you to implement strong access control (who can see what folder).

MapZombie commented 8 years ago

There are work around such as using file:/// but I am unsure how this can be turned on within the geoportal code.

While it's true opening a unc path from a browser is not typical, in the case of an internally facing geoportal it makes sense as files are often hosted on a network drive for users.

If you know of a work around besides the use of iis that would be greatly appreciated.

mhogeweg commented 8 years ago

you will have to unclude the full path (file:////////) in the metadata. wikipedia has a good article about this. there was something in some browsers that resulted having to use 5 ///// instead of 3. just warning about this. also look at use of # in file names and such.

MapZombie commented 8 years ago

Thanks @mhogeweg for that article, very helpful. I have tried out the changing the URL paths in the metadata with: file://////// file:///// file:/// file://

All without success unfortunately. These links when pasted in Chrome are opening without a problem though. Is there anything inherent inside Geoportal that only accepts http:// and ftp:// links that could be modified? Thanks.