Skip to content

Non-text file upload fails #103

@hiucimon

Description

@hiucimon

I am working on a program that needs a binary file to be sent to it, so I downloaded Wasabi, and created this little test program. No, not very clean and yes I know I am just printing null but it is just to see if I am getting to the print. If I supply a txt file, things are fine, as is the two other forms, but any binary file I select results in:

[nioEventLoopGroup-3-4] INFO org.wasabifx.wasabi.interceptors.LoggingInterceptor - [GET] - /bad-request

With the following program:

import org.wasabifx.wasabi.app.AppServer

fun main(args : Array) {
println("Started")
var server = AppServer()
server.get("/testget",{
println(request.bodyParams["filename"])
})
server.post("/testpost",{
println(request.bodyParams["filename"])
})

server.post("/upload",{
    println(request.bodyParams["filename"])
})
server.start()

}

And the following HTML:

<title>Test ClamAV</title> First name:
Last name:
First name:
Last name:
Choose a file to upload:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions