Skip to content

Commit

Permalink
Update to 0.1.7 - mtime (upload) in millis
Browse files Browse the repository at this point in the history
  • Loading branch information
jendakol committed Dec 11, 2018
1 parent 9e65aff commit db8ee6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/lib/server/CloudConnector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package lib.server

import java.io.{ByteArrayInputStream, InputStream, OutputStream}
import java.net.ConnectException
import java.nio.file.AccessDeniedException
import java.nio.file.{AccessDeniedException, Files}
import java.util.concurrent.TimeoutException

import better.files.File
Expand Down Expand Up @@ -73,7 +73,7 @@ class CloudConnector(httpClient: Client[Task], chunkSize: Int, blockingScheduler
val params = Map(
"file_path" -> file.path.toAbsolutePath.toString,
"size" -> file.size.toString,
"mtime" -> file.lastModifiedTime.getEpochSecond.toString
"mtime" -> Files.getLastModifiedTime(file.path).toMillis.toString
)

stream(Method.PUT, "upload", file, callback, params) {
Expand Down Expand Up @@ -307,7 +307,7 @@ class CloudConnector(httpClient: Client[Task], chunkSize: Int, blockingScheduler
resp.bodyAsText.compile.toList
.map(parts => if (parts.isEmpty) None else Some(parts.mkString))
.flatMap { str =>
logger.trace(s"Cloud response body: $str")
logger.debug(s"Cloud response body: $str")

val jsonResult = str.map(io.circe.parser.parse) match {
case Some(Right(json)) => pureResult(Some(json))
Expand Down

0 comments on commit db8ee6e

Please sign in to comment.