Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 652 Bytes

README.md

File metadata and controls

30 lines (23 loc) · 652 Bytes

akka-http-file-server

A file server example to download/upload large files with akka-http.

How to use

sbt "run-main akkahttp.TestApp"

Then Browser http://127.0.0.1:9112/

How it is implemented?

We create a akka-http DSL for this, so it is super easy to create a http file server:

  val route: Route = {
    path("upload") {
      uploadFile { fileMap =>
        complete(ToResponseMarshallable(fileMap))
      }
    } ~
    path("download") {
      parameters("file") { file =>
        downloadFile(file)
      }
    } 

Used by

Big data streaming engine over Akka:

Project Gearpump: https://github.com/gearpump/gearpump