Adding attachments using layer.edit_features fail
See original GitHub issueWhen using layer.edit_features()
to add attachments the method fails and returns None
. This is caused by your requirement of one of the methods adds, deletes or updates to be part of the call.
layer.py:
You should add and "attachments" not in params
as well.
Until fixed a workaround is to add an empty deletes=""
_res = _layer.edit_features(deletes="", use_global_ids=True, gdb_version=_ver, attachments={'adds':[_att]})
print(_res)
Platform (please complete the following information):
- Python API Version: 2.0.0
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How To: Retain all attachments when merging hosted feature ...
Right-click the appended feature layer group layer, and select Edit Features > Synchronize local edits to Server. In ArcGIS Online, check the ...
Read more >Edit feature attachments | ArcGIS Runtime API for .NET
Select features from the feature layer with FeatureLayer.SelectFeatures() . To fetch the feature's attachments, cast to an ArcGISFeature and use ArcGISFeature.
Read more >Working with Attachments in Apps - YouTube
Attachments are a common way to associate images, videos, and PDFs with specific features in feature layers. These attachments can enhance ...
Read more >ArcGIS add photos to features "Enable Attachments ... - YouTube
Learn how to enable attachments to your feature class layer to add photos to your features and add files to it using ArcMapThis...
Read more >Manage hosted feature layers—Portal for ArcGIS
Export data from the hosted feature layer (Allow others to export to different formats); The ability to add attachments to features in hosted...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@HakonD
Ok I see what you are saying. We will further investigate these issues.
Sure, I trust you to find a suitable feature service and attachment file.