Table of Contents

Method AddJobAttachment

Namespace
Skyline.DataMiner.Net.Jobs
Assembly
SLNetTypes.dll

AddJobAttachment(JobID, string, byte[])

Adds a new attachment to the Job with the ID jobID.

public void AddJobAttachment(JobID jobID, string fileName, byte[] fileBytes)

Parameters

jobID JobID

The ID of the Job to add the attachment to.

fileName string

The name of the attachment.

fileBytes byte[]

The contents of the attachment.

Remarks

Please note the following regarding job attachments:

  • The size limit of job attachments depends on the Documents.MaxSize setting in the file MaintenanceSettings.xml. By default, this is 20 MB.
  • Deleting a job will remove all attachments of this job from the system. These cannot be recovered afterwards.
  • Adding job attachments requires the Jobs > UI available and Jobs > Add/Edit user permissions.
  • Job attachments are backed up with the backup option All documents located on this DMA.
  • Job attachments are synced in a cluster.

Available from DataMiner 10.0.5 (RN 24791) onwards.

Exceptions

ArgumentNullException

jobID, fileName or fileBytes is null.

DataMinerException

The InnerException will be an ArgumentException if the jobID does not refer to an existing job.

The InnerException will be null if something went wrong during communication with the server.

DataMinerCOMException

The provided file name contains a relative path (e.g. '../file.txt').

DataMinerSecurityException

The user does not have edit permissions for this job.