Revision 3394
Added by barteau over 17 years ago
lib/style/common/fgdc/ClientViewHelper.jspx | ||
---|---|---|
16 | 16 |
private ClientViewHelper clientHelper; |
17 | 17 |
private MultipartParser multipartParser; |
18 | 18 |
private int sizeLimit; |
19 |
private String contenType; |
|
19 | 20 |
</jsp:declaration> |
20 | 21 |
|
21 | 22 |
<jsp:scriptlet> |
... | ... | |
26 | 27 |
message = ""; |
27 | 28 |
//*** Only process request if a file upload. |
28 | 29 |
if (clientHelper.isLoggedIn()) { |
29 |
//*** Init the MultipartParser. |
|
30 |
multipartParser = new MultipartParser(request, sizeLimit * 1024 * 1024); |
|
31 |
message = clientHelper.handleFileUpdate(multipartParser); |
|
30 |
if (contentType != null && contentType.contains("multipart/form-data")) { |
|
31 |
//*** Init the MultipartParser. |
|
32 |
multipartParser = new MultipartParser(request, sizeLimit * 1024 * 1024); |
|
33 |
message = clientHelper.handleFileUpdate(multipartParser); |
|
34 |
} else { |
|
35 |
message = clientHelper.clientRequest(request, response); |
|
36 |
} |
|
32 | 37 |
} else { |
33 |
message = "you aint logged in";
|
|
38 |
message = "You need to be logged in.";
|
|
34 | 39 |
} |
35 | 40 |
response.setContentType("text/html;charset=UTF-8"); |
36 | 41 |
</jsp:scriptlet> |
Also available in: Unified diff
Modifications to allow for other types of usage, other than file updates, such as file deletes.