Verified Commit d573be28 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

fix file name in image thumbnail report

parent 196930a8
Pipeline #43095 passed with stages
in 6 minutes and 24 seconds
...@@ -32,11 +32,15 @@ object MediaTransformations extends Logging { ...@@ -32,11 +32,15 @@ object MediaTransformations extends Logging {
import sys.process._ import sys.process._
private def executeCommand(command: String): Try[Int] = Try { private def executeCommand(command: String): Try[Int] = Try {
logger.debug(s"Execute: $command")
val stderr = StringBuilder.newBuilder val stderr = StringBuilder.newBuilder
val errorCode = command ! ProcessLogger(logger.debug(_), stderr append _) val errorCode = command ! ProcessLogger(logger.debug(_), stderr append _)
if (errorCode > 0) { if (errorCode > 0) {
throw new IOException(s"application ${command.split(' ')(0)} exited with code $errorCode: ${stderr.toString()}") val errorMsg = s"application ${command.split(' ')(0)} exited with code $errorCode: ${stderr.toString()}"
logger.warn(errorMsg)
throw new IOException(errorMsg)
} else { } else {
logger.debug("Command execution successful")
errorCode errorCode
} }
} }
......
...@@ -110,7 +110,7 @@ class RecordProcessor(fileHandler: DisseminationCopyHandler, ...@@ -110,7 +110,7 @@ class RecordProcessor(fileHandler: DisseminationCopyHandler,
val destPreviewFile = cachedImageFilePath(id, mimeType) val destPreviewFile = cachedImageFilePath(id, mimeType)
val (width, height) = getThumbnailDimensions val (width, height) = getThumbnailDimensions
val resThumbnail = fileHandler.createImageThumbnail(destImageFile, destPreviewFile, width, height) val resThumbnail = fileHandler.createImageThumbnail(destImageFile, destPreviewFile, width, height)
val outcomeThumbnail = createOutcome(resThumbnail, id, ImageThumbnail, destImageFile) val outcomeThumbnail = createOutcome(resThumbnail, id, ImageThumbnail, destPreviewFile)
outcomeMediaFile ++ outcomeThumbnail outcomeMediaFile ++ outcomeThumbnail
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment