Ver Código Fonte

--update handleRequest();

zzy.zhiyuan.foxmail 8 anos atrás
pai
commit
75294d2ebc

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

96
		Integer cLimit = CachedUploadServlet.parseInt(map.get("countLimit"));
96
		Integer cLimit = CachedUploadServlet.parseInt(map.get("countLimit"));
97
		Long sLimit = CachedUploadServlet.parseLong(map.get("sizeLimit"));
97
		Long sLimit = CachedUploadServlet.parseLong(map.get("sizeLimit"));
98
		String jsonpContent = null;
98
		String jsonpContent = null;
99
100
		String[] jces = map.get("function");
99
		String[] jces = map.get("function");
101
		if (jces != null) {
100
		if (jces != null) {
102
			jsonpContent = jces[0];
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
		int countLimit = this.config.getRealCountLimit(cLimit);
105
		int countLimit = this.config.getRealCountLimit(cLimit);
105
		long sizeLimit = this.config.getRealSizeLimit(sLimit);
106
		long sizeLimit = this.config.getRealSizeLimit(sLimit);
106
107
107
		List<CachedItem> items = null;
108
		List<CachedItem> items = null;
108
		boolean byJsonp = null != jsonpContent;
109
		boolean byJsonp = null != jsonpContent;
109
		this.initResponse(resp, byJsonp);
110
		this.initResponse(resp, byJsonp || textJson);
110
		PrintWriter out = resp.getWriter();
111
		PrintWriter out = resp.getWriter();
111
		try {
112
		try {
112
			items = this.upload(req, countLimit, sizeLimit);
113
			items = this.upload(req, countLimit, sizeLimit);