While trying to upload files and the file is a lit...
# ktor
g
While trying to upload files and the file is a little big (>700KB) from kotlin-react with ktor-client I still hit a buffer limit:
Copy code
"IllegalArgumentException: should should be greater than write space + end gap (size = 9, writeRemaining = 0, endGap = 8, rem+gap = 8
    at IllegalArgumentException_init_0 (http://localhost:9000/bundle.js:162304:32)
    at require$ObjectLiteral_1.doFail (http://localhost:9000/bundle.js:34344:9)
    at IoBuffer.writeBufferAppend_ehtrw3$ (http://localhost:9000/bundle.js:35661:7)
    at ByteReadPacket_0.ByteReadPacketBase.prepareRead_87ik6q$ (http://localhost:9000/bundle.js:31628:10)
    at ByteReadPacket_0.ByteReadPacketBase.readAsMuchAsPossible_v6e8td$_0 (http://localhost:9000/bundle.js:31444:15)
    at ByteReadPacket_0.ByteReadPacketBase.readAsMuchAsPossible_v6e8td$_0 (http://localhost:9000/bundle.js:31455:19)
    at ByteReadPacket_0.ByteReadPacketBase.readAsMuchAsPossible_v6e8td$_0 (http://localhost:9000/bundle.js:31455:19)
    at ByteReadPacket_0.ByteReadPacketBase.readAsMuchAsPossible_v6e8td$_0 (http://localhost:9000/bundle.js:31455:19)
    at ByteReadPacket_0.ByteReadPacketBase.readAsMuchAsPossible_v6e8td$_0 (http://localhost:9000/bundle.js:31455:19)
    at ByteReadPacket_0.ByteReadPacketBase.readAsMuchAsPossible_v6e8td$_0 (http://localhost:9000/bundle.js:31455:19)"
I post via
client.submitForm {}
and I’ve tried
submitFormWithBinaryData {}
as well, no differences 😞
e
Hi @galex, could you file a github issue with reproducer?
It looks like io problem
g
Yup will do
Should I create that in github or youtrack? on kotlinx-io?
e
Github. Ktor. I’ll investigate and route.
g
Ok, it will take me some time as I’ve got here one mpp project + client project + backend project.. gosh 😮