Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

NowAttachmentUploadConfiguration structure- iOS

The NowAttachmentUploadConfiguration structure enables you to define the configuration information for an attachment that you are uploading to your ServiceNow instance.

NameTypeDescription
contentTypeStringHTTP data content type.
encryptionContextStringOptional. Sys\_id of an encryption context record. Specify this parameter to allow only users with the specified encryption context to access the attachment. Default: Attached file is not encrypted with any encryption context.
fileNameStringName of the attachment file.
recordSysIdStringSys\_id of the record on the ServiceNow instance to associate the attachment with.
tableNameStringName of the table on the ServiceNow instance that contains the record specified in the recordSysid parameter.

Parent Topic:Mobile SDK - iOS

NowAttachmentUploadConfiguration - init(tableName: String, recordSysId: SysID, fileName: String, contentType: String, encryptionContext: String?)

Sets the upload configuration values for the specified attachment.

NameTypeDescription
tableNameStringName of the table on the ServiceNow instance that contains the record specified in the recordSysid parameter.
recordSysIdStringSys\_id of the record on the ServiceNow instance to associate the attachment with.
fileNameStringName of the attachment file.
contentTypeStringHTTP data content type.
encryptionContextStringOptional. Sys\_id of an encryption context record. Specify this parameter to allow only users with the specified encryption context to access the attachment. Default: Attached file is not encrypted with any encryption context.
TypeDescription
None 

The following code example shows how to call this function.

let recordSysId = "" // Sys_id of the record on the SN instance

let config = NowAttachmentUploadConfiguration(
  tableName: "tableName", 
  recordSysId: recordSysId, 
  fileName: "photo.png",
  contentType: "image/png", 
  encryptionContext: nil)