Table of Contents

Class AttachmentsHelper

Namespace
Skyline.DataMiner.Net.Apps.Utils
Assembly
SLNetTypes.dll

Helper class for ticket attachments.

public class AttachmentsHelper
Inheritance
AttachmentsHelper
Extension Methods

Remarks

Available from DataMiner 10.0.8 (RN 25612) onwards.

  • The maximum size of ticket attachments is determined by the Documents.MaxSize setting, located in the MaintenanceSettings.xml file. Default: 20 MB. Trying to upload a larger file will result in a DataMinerException.
  • Manipulating ticket attachments requires the same user permissions as normal ticket management operations: read permission to view and download attachments and edit permission to add and delete attachments.
  • If a ticket is deleted, all its attachments are physically deleted from the disk. They will not be recoverable.
  • All ticket attachments are synchronized throughout the DataMiner System. To include them in a backup, select the All documents located on this DMA backup option.
  • The Documents API can also be used to manage ticket attachments. Instead of using the above-mentioned methods, you can also use AddDocumentMessage, DeleteDocumentMessage, GetBinaryFileMessage and GetDocumentMessage. If you do so, specify the directory as "TICKET_ATTACHMENTS\{DataminerID}_{TicketId}" and make sure the property ID of type DMAObjectRef contains the ticket ID.

Constructors

AttachmentsHelper(string, string, Func<DMSMessage[], DMSMessage[]>, string)

Methods

Add(IDMAObjectRef, string, byte[])

Adds a new attachment to the IDMAObjectRef.

Delete(IDMAObjectRef, string)

Deletes the attachment with name attachmentName from the object with ID objectRef.

Get(IDMAObjectRef, string)

Get the contents of the attachment with name attachmentName for object with id objectRef.

GetFileNames(IDMAObjectRef)

Returns the names of the files attached to the IDMAObjectRef with ID objectRef.