Rok Oblak
09/11/2024, 3:28 PMMultipart part content length limit of 65536 exceeded?
client:
setBody(MultiPartFormDataContent(formData {
..
append("file", ChannelProvider(bytes.size.toLong(), { ByteReadChannel(bytes) }), ...)
server:
call.receiveMultipart().forEachPart { ...
(crashes in forEachPart)
I see something related but not sure if it is 100% the same:
https://youtrack.jetbrains.com/issue/KTOR-7356Bruce Hamilton
09/11/2024, 3:32 PMcall.receiveMultipart(formFieldLimit = BIG_NUMBER)Rok Oblak
09/11/2024, 3:36 PMBruce Hamilton
09/12/2024, 7:45 AMgavvvr
12/09/2024, 10:20 PMreceiveMultipart() . Then I wanted to build a plugin which would apply large limit on receiveMultipart() for the whole app, for example by putting desired value to FormFieldLimit attribute onCall {}. But the default value of formFieldLimit argument (those 50 Mb) overrides the value from the attribute. So, right now I don't see any way to implicitly apply upload file size limit with a plugin, you must always explicitly pass the desired limit as an argument to receiveMultipart(). Don't you think there should also be an attribute for multipart content, similar to existing FormFieldLimit ?Bruce Hamilton
12/09/2024, 10:23 PMBruce Hamilton
12/09/2024, 10:26 PMgavvvr
12/09/2024, 10:28 PMval FORM_FIELD_LIMIT be publicly available to avoid constructing my own AttributeKey<Long>("FormFieldLimit") object and re-typing attribute name, if I want to put another value?