1
0
mirror of https://github.com/sismics/docs.git synced 2025-12-14 02:06:25 +00:00

Closes #116: Allow all file types

This commit is contained in:
jendib
2016-11-20 18:41:42 +01:00
parent c99b1a1867
commit b36d08db8e
7 changed files with 56 additions and 12 deletions

View File

@@ -64,7 +64,7 @@ public class PdfUtil {
PDFTextStripper stripper = new PDFTextStripper();
pdfDocument = PDDocument.load(inputStream);
content = stripper.getText(pdfDocument);
} catch (IOException e) {
} catch (Exception e) {
log.error("Error while extracting text from the PDF", e);
} finally {
if (pdfDocument != null) {

View File

@@ -19,4 +19,6 @@ public class MimeType {
public static final String OPEN_DOCUMENT_TEXT = "application/vnd.oasis.opendocument.text";
public static final String OFFICE_DOCUMENT = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
public static final String DEFAULT = "application/octet-stream";
}

View File

@@ -60,7 +60,7 @@ public class MimeTypeUtil {
return MimeType.APPLICATION_PDF;
}
return null;
return MimeType.DEFAULT;
}
/**