How to do it...

For this recipe, perform the following steps:

  1. First, create the server portion of the recipe. Create a file named UploadingFileServerApplication.scala inside the com.packt.chapter9 package. The content should be as follows:
        package com.packt.chapter9        import akka.http.scaladsl.model.Multipart        import akka.http.scaladsl.server.Directives._        import akka.http.scaladsl.server.HttpApp        import akka.http.scaladsl.settings.ServerSettings        import akka.stream.scaladsl.Framing        import akka.util.ByteString        import com.typesafe.config.ConfigFactory        import scala.concurrent.duration._        object UploadingFileServer extends HttpApp {          val route =            extractRequestContext { ctx =>              implicit val materializer = ctx.materializer              implicit val ec = ctx.executionContext ...

Get Akka Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.