Commit 1eea71e8 by 段启岩

文件上传限制

parent 619eb270
...@@ -32,7 +32,7 @@ public class SysConstants { ...@@ -32,7 +32,7 @@ public class SysConstants {
public static final long DEFAULT_MAX_SIZE = 1024 * 1024 * 3; public static final long DEFAULT_MAX_SIZE = 1024 * 1024 * 3;
public static final Set<String> SUFFIXES_OF_IMAGE = Set.of("bmp", "jpg", "png", "tif", "gif", "pcx", "tga", "exif", "fpx", "svg", "psd", "cdr", "pcd", "dxf", "ufo", "eps"); public static final Set<String> SUFFIXES_OF_IMAGE = Set.of("bmp","jpeg", "jpg", "png", "tif", "gif", "pcx", "tga", "exif", "fpx", "svg", "psd", "cdr", "pcd", "dxf", "ufo", "eps");
public static final Set<String> SUFFIXES_OF_VIDEO = Set.of(".mp4", ".oog", ".webm"); public static final Set<String> SUFFIXES_OF_VIDEO = Set.of(".mp4", ".oog", ".webm");
......
...@@ -50,13 +50,13 @@ public enum UploadType { ...@@ -50,13 +50,13 @@ public enum UploadType {
/** /**
* 上传CMS内容图片 * 上传CMS内容图片
*/ */
CMS_IMAGES(100, "cms/images/", 1024 * 1024 * 10L, SysConstants.SUFFIXES_OF_IMAGE), CMS_IMAGES(100, "cms/images/", SysConstants.DEFAULT_MAX_SIZE , SysConstants.SUFFIXES_OF_IMAGE),
/** /**
* 上传动态图片 * 上传动态图片
*/ */
TRENDS_VIDEO(101, "trends/videos/", SysConstants.DEFAULT_MAX_SIZE, SysConstants.SUFFIXES_OF_VIDEO); TRENDS_VIDEO(101, "trends/videos/", 1024 * 1024 * 10L, SysConstants.SUFFIXES_OF_VIDEO);
private int ordinal; private int ordinal;
......
...@@ -48,8 +48,8 @@ spring: ...@@ -48,8 +48,8 @@ spring:
servlet: servlet:
multipart: multipart:
max-file-size: 10MB max-file-size: 15MB
max-request-size: 10MB max-request-size: 15MB
server: server:
tomcat: tomcat:
......
...@@ -48,8 +48,8 @@ spring: ...@@ -48,8 +48,8 @@ spring:
servlet: servlet:
multipart: multipart:
max-file-size: 10MB max-file-size: 15MB
max-request-size: 10MB max-request-size: 15MB
server: server:
tomcat: tomcat:
......
...@@ -46,8 +46,8 @@ spring: ...@@ -46,8 +46,8 @@ spring:
value-serializer: org.apache.kafka.common.serialization.StringSerializer value-serializer: org.apache.kafka.common.serialization.StringSerializer
servlet: servlet:
multipart: multipart:
max-file-size: 10MB max-file-size: 15MB
max-request-size: 10MB max-request-size: 15MB
server: server:
tomcat: tomcat:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment