{"action":"created","issue":{"url":"https://api.github.com/repos/akka/akka/issues/19092","labels_url":"https://api.github.com/repos/akka/akka/issues/19092/labels{/name}","comments_url":"https://api.github.com/repos/akka/akka/issues/19092/comments","events_url":"https://api.github.com/repos/akka/akka/issues/19092/events","html_url":"https://github.com/akka/akka/issues/19092","id":120423151,"number":19092,"title":"akka-http file upload does not upload entire file","user":{"login":"hhimanshu","id":6589036,"avatar_url":"https://avatars.githubusercontent.com/u/6589036?v=3","gravatar_id":"","url":"https://api.github.com/users/hhimanshu","html_url":"https://github.com/hhimanshu","followers_url":"https://api.github.com/users/hhimanshu/followers","following_url":"https://api.github.com/users/hhimanshu/following{/other_user}","gists_url":"https://api.github.com/users/hhimanshu/gists{/gist_id}","starred_url":"https://api.github.com/users/hhimanshu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhimanshu/subscriptions","organizations_url":"https://api.github.com/users/hhimanshu/orgs","repos_url":"https://api.github.com/users/hhimanshu/repos","events_url":"https://api.github.com/users/hhimanshu/events{/privacy}","received_events_url":"https://api.github.com/users/hhimanshu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/akka/akka/labels/1%20-%20triaged","name":"1 - triaged","color":"5319e7"},{"url":"https://api.github.com/repos/akka/akka/labels/2%20-%20pick%20next","name":"2 - pick next","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/akka/akka/milestones/65","html_url":"https://github.com/akka/akka/milestones/http-2.0-M3","labels_url":"https://api.github.com/repos/akka/akka/milestones/65/labels","id":1432373,"number":65,"title":"http-2.0-M3","description":"","creator":{"login":"drewhk","id":932285,"avatar_url":"https://avatars.githubusercontent.com/u/932285?v=3","gravatar_id":"","url":"https://api.github.com/users/drewhk","html_url":"https://github.com/drewhk","followers_url":"https://api.github.com/users/drewhk/followers","following_url":"https://api.github.com/users/drewhk/following{/other_user}","gists_url":"https://api.github.com/users/drewhk/gists{/gist_id}","starred_url":"https://api.github.com/users/drewhk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewhk/subscriptions","organizations_url":"https://api.github.com/users/drewhk/orgs","repos_url":"https://api.github.com/users/drewhk/repos","events_url":"https://api.github.com/users/drewhk/events{/privacy}","received_events_url":"https://api.github.com/users/drewhk/received_events","type":"User","site_admin":false},"open_issues":58,"closed_issues":4,"state":"open","created_at":"2015-11-27T12:01:59Z","updated_at":"2015-12-04T15:25:24Z","due_on":"2015-12-22T23:00:00Z","closed_at":null},"comments":10,"created_at":"2015-12-04T15:24:36Z","updated_at":"2015-12-04T23:54:52Z","closed_at":null,"body":"I have a following Server code\r\n```\r\nobject FileUploadServer {\r\n  implicit val system = ActorSystem(\"fileUploadServer\")\r\n  implicit val materializer = ActorMaterializer()\r\n  implicit val ec = system.dispatcher\r\n\r\n\r\n  val route =\r\n    path(\"upload\") {\r\n      post {\r\n        extractRequest { request =>\r\n          println(request)\r\n          val file = File.createTempFile(\"debug\",\".zip\")\r\n          val futureDone: Future[Long] = request.entity.dataBytes.runWith(Sink.file(file))\r\n\r\n          onComplete(futureDone) { result =>\r\n            complete(s\"path:${file.getAbsolutePath}, size:${result.get}\")\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n  def main(args: Array[String]) {\r\n    val serverFuture: Future[ServerBinding] = Http().bindAndHandle(route, \"localhost\", 8080)\r\n\r\n    println(\"FileUpload server is running at http://localhost:8080\\nPress RETURN to stop ...\")\r\n    readLine()\r\n\r\n    serverFuture\r\n      .flatMap(_.unbind())\r\n      .onComplete(_ => system.terminate())\r\n  }\r\n}\r\n```\r\nand in `src/main/resources/application.conf`, I added the following property\r\n```\r\nakka.http.parsing.max-content-length = 1000m\r\n```\r\n\r\nWhen I run this Server and try uploading files, none of the files are completely reached on server.\r\n\r\n```\r\nHarits-MacBook-Pro:bluecoat_proxy_big harit$ ls -ltr\r\ntotal 6527512\r\n-rwxr-xr-x@ 1 harit  278451549   702955469 Jan 16  2006 Demo_log_001.log\r\n-rwxr-xr-x@ 1 harit  278451549   640219081 Jan 16  2006 Demo_log_002.log\r\n-rwxr-xr-x@ 1 harit  278451549  1236988750 Jan 16  2006 Demo_log_003.log\r\n-rwxr-xr-x@ 1 harit  278451549    63359314 Jan 16  2006 Demo_log_004.log\r\n-rw-r--r--  1 harit  278451549   698556119 Dec  3 19:40 debug8467171656889028272.zip\r\nHarits-MacBook-Pro:bluecoat_proxy_big harit$ time curl -X POST -H 'Content-Type: application/octet-stream' -d @Demo_log_002.log http://localhost:8080/upload \r\npath:/var/folders/_2/q9xz_8ks73d0h6hq80c7439s8_x7qx/T/debug8595474789880364697.zip, size:636309909\r\nreal    0m3.862s\r\nuser    0m0.985s\r\nsys    0m1.259s\r\nHarits-MacBook-Pro:bluecoat_proxy_big harit$ time curl -X POST -H 'Content-Type: application/octet-stream' -d @Demo_log_003.log http://localhost:8080/upload \r\npath:/var/folders/_2/q9xz_8ks73d0h6hq80c7439s8_x7qx/T/debug3725748319556259972.zip, size:0\r\nreal    0m3.063s\r\nuser    0m1.638s\r\nsys    0m1.233s\r\nHarits-MacBook-Pro:bluecoat_proxy_big harit$ time curl -X POST -H 'Content-Type: application/octet-stream' -d @Demo_log_004.log http://localhost:8080/upload \r\npath:/var/folders/_2/q9xz_8ks73d0h6hq80c7439s8_x7qx/T/debug4974858157715817152.zip, size:62967784\r\nreal    0m0.290s\r\nuser    0m0.101s\r\nsys    0m0.126s\r\n```\r\n\r\nOn the server, I do not see any exceptions happening either.\r\n\r\nWhat am I doing wrong?\r\n"},"comment":{"url":"https://api.github.com/repos/akka/akka/issues/comments/162112841","html_url":"https://github.com/akka/akka/issues/19092#issuecomment-162112841","issue_url":"https://api.github.com/repos/akka/akka/issues/19092","id":162112841,"user":{"login":"hhimanshu","id":6589036,"avatar_url":"https://avatars.githubusercontent.com/u/6589036?v=3","gravatar_id":"","url":"https://api.github.com/users/hhimanshu","html_url":"https://github.com/hhimanshu","followers_url":"https://api.github.com/users/hhimanshu/followers","following_url":"https://api.github.com/users/hhimanshu/following{/other_user}","gists_url":"https://api.github.com/users/hhimanshu/gists{/gist_id}","starred_url":"https://api.github.com/users/hhimanshu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhimanshu/subscriptions","organizations_url":"https://api.github.com/users/hhimanshu/orgs","repos_url":"https://api.github.com/users/hhimanshu/repos","events_url":"https://api.github.com/users/hhimanshu/events{/privacy}","received_events_url":"https://api.github.com/users/hhimanshu/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T23:54:52Z","updated_at":"2015-12-04T23:54:52Z","body":"I added the sample https://github.com/101bits/akka-http-file-upload. @ktoso, I will add ticket now"}}