mirror of
https://github.com/sismics/docs.git
synced 2025-12-14 10:16:21 +00:00
PDF handling, file upload progression
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
package com.sismics.docs.core.dao.lucene;
|
||||
|
||||
|
||||
/**
|
||||
* Lucene Article DAO.
|
||||
*
|
||||
* @author bgamard
|
||||
*/
|
||||
public class ArticleDao {
|
||||
|
||||
}
|
||||
@@ -16,4 +16,6 @@ public class MimeType {
|
||||
public static final String IMAGE_GIF = "image/gif";
|
||||
|
||||
public static final String APPLICATION_ZIP = "application/zip";
|
||||
|
||||
public static final String APPLICATION_PDF = "application/pdf";
|
||||
}
|
||||
|
||||
@@ -37,6 +37,8 @@ public class MimeTypeUtil {
|
||||
return MimeType.IMAGE_PNG;
|
||||
} else if (headerBytes[0] == ((byte) 0x00) && headerBytes[1] == ((byte) 0x00) && headerBytes[2] == ((byte) 0x01) && headerBytes[3] == ((byte) 0x00)) {
|
||||
return MimeType.IMAGE_X_ICON;
|
||||
} else if (headerBytes[0] == ((byte) 0x25) && headerBytes[1] == ((byte) 0x50) && headerBytes[2] == ((byte) 0x44) && headerBytes[3] == ((byte) 0x46)) {
|
||||
return MimeType.APPLICATION_PDF;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user