Commit ab8349f6 authored by Maxym Borodenko's avatar Maxym Borodenko
Browse files

Asciidoc missing images

parent a98587c9
......@@ -22,7 +22,6 @@ public class AsciiDocController extends BaseController {
private static final String DOCS_SECTIONS_DIR = "sections/";
private static final String DOCS_IMAGES_DIR = "images/";
private static final String HTML_EXTENSION = ".html";
private static final String PNG_EXTENSION = ".png";
public String viewDoc(ModelMap model, @PathVariable(value = "documentName") String documentName) throws IOException {
......@@ -74,8 +73,7 @@ public class AsciiDocController extends BaseController {
public byte[] getImage(@PathVariable(value = "imageName") String imageName) throws IOException {
ClassLoader classLoader = this.getClass().getClassLoader();
String imgPath = new StringBuilder(DOCS_DIR).append(DOCS_IMAGES_DIR)
String imgPath = new StringBuilder(DOCS_DIR).append(DOCS_IMAGES_DIR).append(imageName).toString();
InputStream inputStream = classLoader.getResourceAsStream(imgPath);
if (inputStream == null) {
Markdown is supported
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