add default input providers
This commit is contained in:
client/src/jsMain/kotlin/dev/inmo/postssystem/client/utils
features
common
common
build.gradle
src
commonMain
kotlin
dev
inmo
postssystem
features
common
common
jsMain
kotlin
dev
inmo
postssystem
features
common
jvmMain
kotlin
dev
inmo
postssystem
features
common
files
common
src
jvmMain
kotlin
dev
inmo
postssystem
features
files
common
gradle
server/src/main/resources/web
services/posts
client
src
commonMain
kotlin
dev
inmo
postssystem
services
posts
server
src
jvmMain
kotlin
dev
inmo
postssystem
services
posts
@ -5,6 +5,7 @@ import dev.inmo.postssystem.features.files.common.FullFileInfo
|
||||
import dev.inmo.micro_utils.common.*
|
||||
import dev.inmo.micro_utils.mime_types.KnownMimeTypes
|
||||
import dev.inmo.micro_utils.mime_types.findBuiltinMimeType
|
||||
import dev.inmo.postssystem.features.common.common.BytesBasedInputProvider
|
||||
import io.ktor.utils.io.core.ByteReadPacket
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import org.khronos.webgl.ArrayBuffer
|
||||
@ -27,9 +28,8 @@ fun uploadFileCallbackForHTMLInputChange(
|
||||
FullFileInfo(
|
||||
FileName(file.name),
|
||||
findBuiltinMimeType(file.type) ?: KnownMimeTypes.Any,
|
||||
) {
|
||||
ByteReadPacket(bytes)
|
||||
}
|
||||
BytesBasedInputProvider(bytes)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user