Skip to content

Commit 19f9da9

Browse files
committed
demo gae server fix
1 parent 06be01c commit 19f9da9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

demo/src/com/df/angularfileupload/FileUpload.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ public class FileUpload extends HttpServlet {
2121
@Override
2222
protected void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
2323
try {
24-
if (req.getHeader("Content-Type").startsWith("multipart/form-data")) {
24+
if (req.getHeader("Content-Type") != null
25+
&& req.getHeader("Content-Type").startsWith("multipart/form-data")) {
2526
ServletFileUpload upload = new ServletFileUpload();
2627

2728
FileItemIterator iterator = upload.getItemIterator(req);

0 commit comments

Comments
 (0)