我必须允许上传除可执行文件之外的所有类型的文件。我该如何为它添加限制?
public class FileUtility {
private static final long MAX_SIZE_FILES = 1024 * 1024*10;
public static boolean isValidFileType(String mimeType){
//i have to put restriction here
return false;
}
public static boolean isValidFileSize(long fileSize ) {
if (MAX_SIZE_FILES< fileSize){
return false;
}
return true;
}
}