Link to local pdf files with links stored in a table from the portal

735
7
Jump to solution
08-19-2021 03:25 AM
jloiseaux
New Contributor II

Hi all, hope you re having a great day.

Version: Portal for Arcgis 10.5.1

I am trying to add hyperlinks to pdf files stored locally on our local network from the content menu of a layer on the local portal.

Link to files are stored on a geodatabase. I am adding  {fieldname} on the hyperlink field. It does go to the right page (s:\test\item27.pdf) as s is the local  network folder.  However you have to reload for the page for it to load the pdf in the browser.

It does work ok in an old version of IE but does not work in firefox neither in chrome. The user has to reload the page for it to work in firefox and does not work at all in chrome.

I found a workaround by adding the pdf file as a content on the portal content folders and it works.

I know there is a way with Python to populate the portal content folder with all the pdfs but I would prefer a direct link to the local network folder that works as the pdf files can be updated every day by users.

Hope someone has already encountered this issue.

Thank you.

 

0 Kudos
1 Solution

Accepted Solutions
Borch
by
New Contributor II

Hi Julien,

This is a browser limitation, not a Portal for ArcGIS issue:

Firefox and Chrome doesn't open "file://" links from pages that originated from outside the local machine. This is a design decision made by those browsers to improve security.

Linking a UNC / Network drive on an html page | Newbedev

BR

Borja

View solution in original post

7 Replies
jcarlson
MVP Frequent Contributor

You can't link to a local filepath form Portal, unfortunately. Anything besides https://... is going to be automatically re-written as the URL you are currently at.

Preview of destination URL for FTP link.Preview of destination URL for FTP link.

 

We have an internal viewer where our users want to have the same capability. The best we've been able to do is provide the filepath string that they can copy and paste into their file explorer address bar.

As far as I know, the only way to access local resources like files with a clickable link is to use desktop software.

- Josh Carlson
Kendall County GIS
jloiseaux
New Contributor II

Good Morning Mr. Carlson. Thank you for your answer. Actually the "local" hyperlink does throw the user on a page with the local link to the local pdf file on the url bar of firefox, but it does not load the file, the user has to reload the page and it works. Maybe that can help to prevent your users to copy and paste the link. 

We re working for a fire county brigade and we 're hoping there is a faster way for the teams  to access those pdf files.  I m waiting for other experiences. Thank you.

 

0 Kudos
Borch
by
New Contributor II

Hi,

You can create a virtual directory in IIS and then populate a field with the url. After that, configure the popup in the webmap to add a link based on that field

How to create a virtual directory on an existing Web site to a folder that resides on a remote compu...

Use attribute-based URL parameters in pop-up links (esri.com)

Regards

Borja

jloiseaux
New Contributor II

Hi Borja,

Thank you for your answer we can't publish files out of our organization for now but I believe this solution can be used on a local website. We might propose this solution to our IT team but I am still surprised we cannot  access to a local file with kind of a special uri from the portal like file://[host]/path. Also it's sad we can't access items created in the content folder using item tags within the HTML context code as it would have been easier to populate in a table than links with unique keys, maybe it will be implemented in the next versions of the portal.

Thank you,

Best regards,

Julien.

0 Kudos
Borch
by
New Contributor II

Hi Julien,

This is a browser limitation, not a Portal for ArcGIS issue:

Firefox and Chrome doesn't open "file://" links from pages that originated from outside the local machine. This is a design decision made by those browsers to improve security.

Linking a UNC / Network drive on an html page | Newbedev

BR

Borja

View solution in original post

jloiseaux
New Contributor II

Hi Borja,

I see that is why it works on an old version of IE but not in Chrome and Firefox. I would be curious about Edge but I believe they did the security correction as well.

Thank you,

Have a great day.

0 Kudos
Borch
by
New Contributor II

Yes, Edge is based on Chrome.

Cheers