1
0
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:
jendib
2013-07-28 18:29:03 +02:00
parent 19000d095f
commit 471933ca8c
14 changed files with 186 additions and 105 deletions

View File

@@ -1,11 +0,0 @@
package com.sismics.docs.core.dao.lucene;
/**
* Lucene Article DAO.
*
* @author bgamard
*/
public class ArticleDao {
}

View File

@@ -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";
}

View File

@@ -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;