NowAttachmentUploadConfiguration structure - iOS

  • リリースバージョン: Australia
  • 更新日 2026年03月12日
  • 所要時間:3分
  • The NowAttachmentUploadConfiguration structure enables you to define the configuration information for an attachment that you are uploading to your ServiceNow instance.

    表 : 1. Properties
    Name Type Description
    contentType String HTTP data content type.
    encryptionContext String Optional. 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.

    fileName String Name of the attachment file.
    recordSysId String Sys_id of the record on the ServiceNow instance to associate the attachment with.
    tableName String Name of the table on the ServiceNow instance that contains the record specified in the recordSysid parameter.

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

    Sets the upload configuration values for the specified attachment.

    表 : 2. Parameters
    Name Type Description
    tableName String Name of the table on the ServiceNow instance that contains the record specified in the recordSysid parameter.
    recordSysId String Sys_id of the record on the ServiceNow instance to associate the attachment with.
    fileName String Name of the attachment file.
    contentType String HTTP data content type.
    encryptionContext String Optional. 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.

    表 : 3. Returns
    Type Description
    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)