-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Version
4.5.14
Context
/upload-file:
post:
operationId: uploadFile
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
responses:
200:
description: OK
If you try to send binary file such as pdf, xlsx and etc , this file will be corrupted bacause MultipartFormTransformer read all body as string (UTF-8), binary file cotains not valid UTF-8 symbols that will be deleted , it seems to me that form must be parsed only on bytes level
text.pdf - original file that i upload on server
parsed_text.pdf - file that i got on server side from validatedRequest
val file = validatedRequest.body.jsonObject.getBuffer("file")
File.createTempFile("parsed_text", ".pdf").writeBytes(file.bytes)
I understand that i use vertx 4.5.14, but i looked at 5 version and seems to me there is the same problem
java 21.0.7 2025-04-15 LTS
Java(TM) SE Runtime Environment (build 21.0.7+8-LTS-245)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.7+8-LTS-245, mixed mode, sharing)
Windows x86-64
Steps to reproduce
No response
Do you have a reproducer?
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working