Skip to content

Commit

Permalink
Using InputStream instead of URL in StreamUploadContent (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
jguz-pubnub authored Jul 29, 2024
1 parent 2d29625 commit 9cf07bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -17,7 +18,7 @@ data class FileUploadContent(
) : Uploadable()

data class StreamUploadContent(
val url: NSURL,
val stream: NSInputStream,
val contentType: String?,
val contentLength: Int
) : Uploadable()

0 comments on commit 9cf07bb

Please sign in to comment.