Browse Source

--update handleRequest();

zzy.zhiyuan.foxmail 8 years ago
parent
commit
75294d2ebc

+ 3 - 2
jfwWebUtil/src/main/java/org/jfw/web/servlet/fileupload/cached/CachedUploadServlet.java

@ -96,17 +96,18 @@ public class CachedUploadServlet extends HttpServlet {
96 96
		Integer cLimit = CachedUploadServlet.parseInt(map.get("countLimit"));
97 97
		Long sLimit = CachedUploadServlet.parseLong(map.get("sizeLimit"));
98 98
		String jsonpContent = null;
99
100 99
		String[] jces = map.get("function");
101 100
		if (jces != null) {
102 101
			jsonpContent = jces[0];
103 102
		}
103
		String[] hasText = map.get("text");
104
		boolean textJson = hasText != null && hasText.length > 0 && "1".equals(hasText[0]);
104 105
		int countLimit = this.config.getRealCountLimit(cLimit);
105 106
		long sizeLimit = this.config.getRealSizeLimit(sLimit);
106 107
107 108
		List<CachedItem> items = null;
108 109
		boolean byJsonp = null != jsonpContent;
109
		this.initResponse(resp, byJsonp);
110
		this.initResponse(resp, byJsonp || textJson);
110 111
		PrintWriter out = resp.getWriter();
111 112
		try {
112 113
			items = this.upload(req, countLimit, sizeLimit);