mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-08-14 17:58:27 +00:00
REPO-3422 Startup check for LibreOffice
Also included the transformer name on the log and error pages.
This commit is contained in:
@@ -96,6 +96,24 @@ public class LibreOfficeController extends AbstractTransformerController
|
||||
this.jodconverter = jodconverter;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getTransformerName()
|
||||
{
|
||||
return "LibreOffice";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String version()
|
||||
{
|
||||
// This method is simply used to check the availability in the case of LibreOffice.
|
||||
if (!jodconverter.isAvailable())
|
||||
{
|
||||
throw new TransformException(500, "LibreOffice is not yet available");
|
||||
}
|
||||
|
||||
return "LibreOffice available";
|
||||
}
|
||||
|
||||
@PostMapping("/transform")
|
||||
public ResponseEntity<Resource> transform(HttpServletRequest request,
|
||||
@RequestParam("file") MultipartFile sourceMultipartFile,
|
||||
|
@@ -1,10 +1,6 @@
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<body>
|
||||
|
||||
<div th:if="${message}">
|
||||
<h2 th:text="${message}"/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2>LibreOffice Test Transformation</h2>
|
||||
<form method="POST" enctype="multipart/form-data" action="/transform">
|
||||
|
Reference in New Issue
Block a user