Attempt to publish Hosted Feature Layer did not maintain attachments from desktop

2382
7
Jump to solution
07-22-2021 09:33 AM
Henry
by
Occasional Contributor II

Hi,

I had a large (~5GB) feature layer stored in a geodatabase with an attachment table and relationship class that stores a ton of pictures. I attempted to publish to ArcGIS Online from ArcGIS Pro and the publishing succeeded after a long while, however none of the attachments are available in the data table.

The Service Definition has recorded the appropriate file size, however the Hosted Feature Layer itself lists the attachment size as 0KB.

Is there a setting I can enable to ensure that the attachments transfer over with the feature layer publishing as well? Or would it be recommended to upload the Geodatabase first and then publish the Hosted Feature Layer from that instead of going through Pro?

Thanks

Henry

Henry
1 Solution

Accepted Solutions
Henry
by
Occasional Contributor II

Thanks for the article Davin, I did try a different method through ArcGIS Pro that ended up working -

What I did in my first unsuccessful attempt was right-click the layer in the Table of Contents and initiated the "Share as Web Layer" tool through that - which resulted in it not uploading the attachments.

What I did the second time was share the web map as a web layer (I think?):

1) Loaded all my data, confirmed attachments accessible in ArcGIS Pro on desktop

2) With Map selected in Table of Contents - navigated to Share tab on toolbar > Share as Web Layer > Publish Web Layer

3) Fill in details as normally, had the maintain attachments geoprocessing environment checked on just incase

4) Analyzed and published layer

5) Attachments for the Hosted Feature layer are now accessible in AGOL

I guess my problem was I was initiating the Share as Web Layer tool through from the Feature Layer in the Table of Contents, while sharing the Map as a Web Layer via the toolbar gave me the result I wanted - and kept the attachments for each record in the Feature Layer into the.Hosted version in AGOL.

It's possible the difference is documented somewhere - but its not immediately obvious what the difference is from Sharing a Layer as a Web Layer vs. Sharing Map as a Web Layer - although it seems clear to me now in hindsight. Unsure where its stated that one method or the other does or doesn't keep attachments stored in an attachment table with relationship class. I just assumed if I was sharing the Feature Layer I wanted from the Table of Contents that the attachments would come with.

Henry

View solution in original post

7 Replies
DavinWalker2
Esri Contributor

Hi Henry,

I know this article is for ArcMap but it might provide some clues as why it isn't working.

Problem: Feature Service attachments created in ArcGIS Desktop are not found in ArcGIS Online pop-up...

0 Kudos
Henry
by
Occasional Contributor II

Thanks for the article Davin, I did try a different method through ArcGIS Pro that ended up working -

What I did in my first unsuccessful attempt was right-click the layer in the Table of Contents and initiated the "Share as Web Layer" tool through that - which resulted in it not uploading the attachments.

What I did the second time was share the web map as a web layer (I think?):

1) Loaded all my data, confirmed attachments accessible in ArcGIS Pro on desktop

2) With Map selected in Table of Contents - navigated to Share tab on toolbar > Share as Web Layer > Publish Web Layer

3) Fill in details as normally, had the maintain attachments geoprocessing environment checked on just incase

4) Analyzed and published layer

5) Attachments for the Hosted Feature layer are now accessible in AGOL

I guess my problem was I was initiating the Share as Web Layer tool through from the Feature Layer in the Table of Contents, while sharing the Map as a Web Layer via the toolbar gave me the result I wanted - and kept the attachments for each record in the Feature Layer into the.Hosted version in AGOL.

It's possible the difference is documented somewhere - but its not immediately obvious what the difference is from Sharing a Layer as a Web Layer vs. Sharing Map as a Web Layer - although it seems clear to me now in hindsight. Unsure where its stated that one method or the other does or doesn't keep attachments stored in an attachment table with relationship class. I just assumed if I was sharing the Feature Layer I wanted from the Table of Contents that the attachments would come with.

Henry
mikAMD
by
Occasional Contributor II

I've been having this problem regularly.
I have a geodatabase stored directly on ArcGIS Online which contains multiple layers & tables. I'm working on modifying the attributes and values of these and the geodatabase is my backup.

Usually I would delete the hosted feature layer after I mess it up and publish the backup geodatabase either with the AGOL interface ("publish" button) or with a python script through the API (item.publish()).

Most of the times, the attachments would not show up. I'd delete the newly published hosted feature layer, and maybe 1 out of 3 times, the attachments would show up, but now it seems to just not work anymore.

I tried your method yesterday and it works (I downloaded the geodatabase first then loaded it into ArcGIS Pro). The attachments size is still 0 kb though (even though I do see them in the data tab). And all my relations lost their names. And this method is way longer (couple of hours) than what I would usually do (less than 10 minutes).

I'm gonna message esri about this because I would like a permanent fix or info on how to properly publish with the attachments every time.

Krocha
by
New Contributor III

Did you ever get to get in contact with ESRI tech support about this? I have a feature layer with attachments that i have to download from AGOL to save it in the Enterprise Geodatabase. Its terrible that it takes hours to download.

0 Kudos
mikAMD
by
Occasional Contributor II

In my case yes somebody from ESRI support worked with me on this.

Basically they didn't have a solution except to try and try again.

I downloaded the geodatabase and published from ArcGIS Pro. I tried multiple times and each time took a couple of hours. Once the attachments were there, I saved it as a gdb on AGOL. Then recreated the relationships and other stuff that got lost.

0 Kudos
LarsArneson
New Contributor III

I have been working with a similar situation lately and the amount of posts that go into details about how it doesn't work is a bit disheartening. I've tried downloading the results from a S123 into a GDB 3 times now and it has failed to create a .zip that opens every time.

0 Kudos
AvaPatterson
New Contributor III

Has anyone had an issue before where:
1. Publish a HFL from a geodatabase with attachments
2. Attachments are enabled BUT say 0 attachments on all features of the published HFL
3. When you bring the hfl into Pro, you see the attachments in the attribute pane
4. When you download the HFL as a fgdb, the attachments are there
5. When I try to publish the downloaded fgdb by adding an item in AGOL, the attachments aren't there.

0 Kudos