ArcGIS Pro 2.6 API Reference Guide
SetContentType Method

ArcGIS.Core.Data Namespace > Attachment Class : SetContentType Method
The MIME type of the attached document.
Sets the MIME type of the attached document. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public void SetContentType( 
   string contentType
)
Public Sub SetContentType( _
   ByVal contentType As String _
) 

Parameters

contentType
The MIME type of the attached document.
Exceptions
ExceptionDescription
A geodatabase-related exception has occurred.
Remarks
The MIME type should match the extension on the name of the attachment data provided. It can be any string provided. However, for applications in the ArcGIS platform to correctly open the attachment it must match the attached document. For example, to attach a png image file named 'FireTruck09.png', the ContentType would be: 'image/png'.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

Attachment Class
Attachment Members