|
|
@@ -76,8 +76,10 @@ public class ConsoleServiceImpl implements ConsoleService {
|
|
|
@Override
|
|
|
public void registerAndBind(UploadResult uploadResult) {
|
|
|
String contentType = uploadResult.getContentType();
|
|
|
- int fileType = ObjectType.Any.getValue();
|
|
|
- if (contentType.startsWith("video")) {
|
|
|
+ int fileType = ObjectType.Other.getValue();
|
|
|
+ if (contentType.startsWith("image")) {
|
|
|
+ fileType = ObjectType.Image.getValue();
|
|
|
+ } else if (contentType.startsWith("video")) {
|
|
|
fileType = ObjectType.Video.getValue();
|
|
|
} else if (contentType.startsWith("audio")) {
|
|
|
fileType = ObjectType.Audio.getValue();
|
|
|
@@ -91,8 +93,6 @@ public class ConsoleServiceImpl implements ConsoleService {
|
|
|
fileType = ObjectType.DocExcel.getValue();
|
|
|
} else if (contentType.equals("application/vnd.openxmlformats-officedocument.presentationml.presentation")) {
|
|
|
fileType = ObjectType.DocPpt.getValue();
|
|
|
- } else if (contentType.startsWith("application/")) {
|
|
|
- fileType = ObjectType.Other.getValue();
|
|
|
}
|
|
|
|
|
|
long uploadBy = uploadResult.getUploadBy();
|