publishFileMessage

expect abstract fun publishFileMessage(channel: String, fileName: String, fileId: String, message: Any? = null, meta: Any? = null, ttl: Int? = null, shouldStore: Boolean? = null, customMessageType: String? = null): PublishFileMessage
actual abstract fun publishFileMessage(channel: String, fileName: String, fileId: String, message: Any?, meta: Any?, ttl: Int?, shouldStore: Boolean?, customMessageType: String?): PublishFileMessage

Publish file message from specified Channel.

Parameters

channel

Name of channel to which the file has been uploaded.

fileName

Name under which the uploaded file is stored.

fileId

Unique identifier for the file, assigned during upload.

message

The payload. Warning: It is important to note that you should not serialize JSON when sending signals/messages via PubNub. Why? Because the serialization is done for you automatically. Instead just pass the full object as the message payload. PubNub takes care of everything for you.

meta

Metadata object which can be used with the filtering ability.

ttl

Set a per message time to live in storage. - If shouldStore = true, and ttl = 0, the message is stored with no expiry time. - If shouldStore = true and ttl = X (X is an Integer value), the message is stored with an expiry time of X hours. - If shouldStore = false, the ttl parameter is ignored. - If ttl isn't specified, then expiration of the message defaults back to the expiry value for the key.

shouldStore

Store in history. If not specified, then the history configuration of the key is used.

customMessageType

The custom type associated with the message.

actual abstract fun publishFileMessage(channel: String, fileName: String, fileId: String, message: Any?, meta: Any?, ttl: Int?, shouldStore: Boolean?, customMessageType: String?): PublishFileMessage