Skip to content

Commit

Permalink
ufal/be-generate-preview-for-html
Browse files Browse the repository at this point in the history
  • Loading branch information
milanmajchrak authored Oct 30, 2023
1 parent 28e5a89 commit a3b90fd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ private List<FileInfo> getFilePreviewContent(Context context, Bitstream bitstrea
private List<FileInfo> processInputStreamToFilePreview(Context context, Bitstream bitstream,
List<FileInfo> fileInfos, InputStream inputStream)
throws IOException, SQLException, ParserConfigurationException, SAXException, ArchiveException {
if (bitstream.getFormat(context).getMIMEType().equals("text/plain")) {
String bitstreamMimeType = bitstream.getFormat(context).getMIMEType();
if (bitstreamMimeType.equals("text/plain") || bitstreamMimeType.equals("text/html")) {
String data = getFileContent(inputStream);
fileInfos.add(new FileInfo(data, false));
} else {
Expand Down

0 comments on commit a3b90fd

Please sign in to comment.