Hi, I've got an editable hosted feature layer view that I'm trying to restrict editing on to a handful of very specific scenarios. Disabling editing on specific fields gets me part way, but I'd like to do something similar for attachments - make it so the users can view attachments, but they can't add new attachments nor can they delete existing attachments. Anyone know if this is possible? I'm assuming it isn't via the UI but wondering if there's a REST API call I can make. I'd prefer to restrict access the view level rather than the application level, e.g. S123.
Hi,
You can set the "HasAttachments" Property to "false" to disable the ability to add new attachments. You can also set the "capabilities" property to "Query" to allow users to view existing attachments but not delete them.
Here is an example of JSON code, that disables adding new attachments while allowing users to view existing attachments:
In the request body, include
{
"capabilities": "Query",
"hasAttachments": false
}
Best,
Omar
Thanks! I'll give that a spin today and see how it goes.
Edit - Update on this, unfortunately it seems to prevent the view's users from viewing attachments altogether, not just adding or removing attachments.