diff --git a/pubnub-kotlin/pubnub-kotlin-api/src/iosMain/kotlin/com/pubnub/api/endpoints/files/SendFile.ios.kt b/pubnub-kotlin/pubnub-kotlin-api/src/iosMain/kotlin/com/pubnub/api/endpoints/files/SendFile.ios.kt index 5c33f33a4..47ec51ace 100644 --- a/pubnub-kotlin/pubnub-kotlin-api/src/iosMain/kotlin/com/pubnub/api/endpoints/files/SendFile.ios.kt +++ b/pubnub-kotlin/pubnub-kotlin-api/src/iosMain/kotlin/com/pubnub/api/endpoints/files/SendFile.ios.kt @@ -73,7 +73,7 @@ class SendFileImpl( fileURL = content.url ) is StreamUploadContent -> PubNubInputStreamContentObjC( - stream = NSInputStream(content.url), + stream = content.stream, contentType = content.contentType, contentLength = content.contentLength.toLong() ) diff --git a/pubnub-kotlin/pubnub-kotlin-api/src/iosMain/kotlin/com/pubnub/kmp/abstractions.ios.kt b/pubnub-kotlin/pubnub-kotlin-api/src/iosMain/kotlin/com/pubnub/kmp/abstractions.ios.kt index f740adc90..e13937fd7 100644 --- a/pubnub-kotlin/pubnub-kotlin-api/src/iosMain/kotlin/com/pubnub/kmp/abstractions.ios.kt +++ b/pubnub-kotlin/pubnub-kotlin-api/src/iosMain/kotlin/com/pubnub/kmp/abstractions.ios.kt @@ -1,6 +1,7 @@ package com.pubnub.kmp import platform.Foundation.NSData +import platform.Foundation.NSInputStream import platform.Foundation.NSURL actual class CustomObject(val value: Any) @@ -17,7 +18,7 @@ data class FileUploadContent( ) : Uploadable() data class StreamUploadContent( - val url: NSURL, + val stream: NSInputStream, val contentType: String?, val contentLength: Int ) : Uploadable()