Using ArcGIS Online To Store Linked Documents

14243
18
05-22-2013 06:02 AM
BrianHaren
Occasional Contributor
ArcGIS Online (subscription account) now offers the ability to store certain non-spatial document types (PDF, JPG, TIF, etc) directly in the ArcGIS Online cloud.  I'd like to use this feature to store documents (PDFs) that I use as linked documents in Map Notes feature pop-ups in my web maps.  Unfortunately it appears that ArcGIS Online does not generate a URL for these documents once they are uploaded so I can't add them as a linked document.

Is there a work-around for this limitation?  I need to provide these linked documents to customers outside our domain and having them accessed directly from our ArcGIS Online site is an ideal solution.

Thanks in advance!
Tags (2)
18 Replies
MikeTschudi
Occasional Contributor
Hi Brian,

http://www.arcgis.com/sharing/rest/content/items/<itemId>/data
works for me for PDF items shared with everyone, where the item ID comes from the URL of the ArcGIS Online item, e.g.,
http://<organization>.maps.arcgis.com/home/item.html?id=7e92720c9f264cd6b07c247c2e43b06

Mike
JohnPower
New Contributor II
We would like to do a similar thing with linked PDF documents, but only want to share them within our organization. How would I configure the URL for that scenario?
MikeMinami
Esri Notable Contributor
John,

The URL would not be different. Because the document is stored in ArcGIS Online, the same sharing rules apply. If you share the document with the organization, then only members of the organization will be able to view it. If they are viewing from the ArcGIS.com website, they can go to the item, click the Open button to download a copy of the PDF.

If you are writing your own application to access the PDF, then your app will have to authenticate the user, then use a token to access the PDF item.

hope this helps,

Mike
0 Kudos
JohnPower
New Contributor II
Mike,

Thanks for the suggestion. I did as you suggested, but when I click on the URL link I get the following error message:
"ArcGIS Portal Directory
You do not have permission to access this resource or perform this operation. Error: 403"

Thanks,
John
0 Kudos
MikeMinami
Esri Notable Contributor
John,

So you went to the item details page, and clicked the Open button and chose the Download option? And you saw the error message?

If you are trying to use the URL directly like mentioned above:

"http://www.arcgis.com/sharing/rest/content/items/<itemId>/data"

and, for example, embed it in a website, it won't work unless you write code to authenticate the user.

Thanks,

Mike
0 Kudos
JohnPower
New Contributor II
Mike,

Thanks for the reply. Yes, I want the user to be able to view the PDF from a pop-up note. Where would I find information on writing code to authenticate the user, and using a token to access the PDF item.

Thanks,
John
0 Kudos
JohnPower
New Contributor II
Mike,

I spoke to one of our GIS Developers and he wondered why I would need to authenticate users when I am using an ESRI app template out of the box. To clarify, I did not write a custom app.

Thanks,
0 Kudos
MikeMinami
Esri Notable Contributor
John,

This is the workflow I was describing:


  • A member of your organization sign in to <org>.maps.arcgis.com.

  • Because you're shared your PDF, they can find it via search or other means.

  • They visit the page describing the item (item details page) and click Open.

  • There should be no additional sign in required as they are already signed in.

  • Depending on the browser, they may see the option to open or save the file.


My comment regarding authentication (sign in) would occur if they are not signed in already. For example, you might choose to copy the URL to the item and put it as a link on another web page, like a company web page. In this case, your website would have to authenticate the user.

To make it work from a popup in the same way (it won't display in the popup), the URL to the PDF would have to be an attribute value of your data. As long as the user is signed in, it should work. Alternatively, you could make the item public.

Mike
0 Kudos
yeoannyvenetsanos
New Contributor II
Hi Brian, 

http://www.arcgis.com/sharing/rest/content/items/<itemId>/data
works for me for PDF items shared with everyone, where the item ID comes from the URL of the ArcGIS Online item, e.g., 
http://<organization>.maps.arcgis.com/home/item.html?id=7e92720c9f264cd6b07c247c2e43b06

Mike


I did this step and it seemed to work, although when you click on the hyperlink, the application takes you to the details page of the file instead of the file itself. Is there a way to hyperlink directly to the PDF? I was able to successfully do this, but there was an expiration constraint on the file. Any assistance would be most appreciated.

Yeoanny
0 Kudos