if(!item.isFormField()) {
String fileName = item.getName();
InputStream is = item.getInputStream();
try {
LookAheadInputStream lis = new LookAheadInputStream(is, 16);
if(!lis.startsWith("PK")) {
result(req, resp, HttpServletResponse.SC_BAD_REQUEST, "The uploaded file is not a zip file");
return;
}
JsonImport imp = new JsonImport(new JsonImport.ZipImportSource(lis));