title: AkkaHTTP : How to access captured values from the path when using mutlpart upload ( entity(as[ Multipart.FormData]) )
body: <p>I'm trying to access captured values from path while uploading a file but unable to get the idea on implementation.</p>
  
  <p>Here is the sample code: </p>
  
  <pre><code>trait TestRoute extends {
    val regEx = """(\w+)""".r
    def testRoute: Route = path("testing" / regEx / regEx / regEx){
      post {
        //How do i Access (captured regex from the path) inside entity
        entity(as[Multipart.FormData]) { fileData =&gt; {
          complete {
             "UpLoadDOne"
          }  
         }
      }
     }
  }           
  </code></pre>
  
  <p><a href="http://localhost:9000/testing/A/B/C" rel="nofollow">http://localhost:9000/testing/A/B/C</a></p>
  
  <p>Appreciate your help!  </p>