Skip to content

Instantly share code, notes, and snippets.

@yomajkel yomajkel/post.scala
Created Sep 24, 2018

What would you like to do?
the description for this gist
path("temp") {
withRequestTimeout(20.seconds) {
extractExecutionContext { implicit executor =>
storeUploadedFile("file", tempDestination) {
case (metadata, file) =>
val uploadFuture = S3ClientService.upload(file.toPath)
onComplete(uploadFuture) {
case Success(_) => complete(StatusCodes.OK)
case Failure(_) => complete(StatusCodes.FailedDependency)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.