blob: 11b6ec6150245eda6e793872f340e434615c594c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
package test.cask
import io.undertow.server.HttpServerExchange
import io.undertow.server.handlers.form.FormData
object MultipartFileUploads extends cask.MainRoutes{
// curl -F "image=@build.sc" localhost:8080/upload
@cask.post("/upload")
def uploadFile(formData: FormData) = {
val file = formData.getFirst("image")
file.getFileName
}
initialize()
}
|