You are calling
req.getPart("Upload file");
, but your
<input>
has
name="file1"
.
I suspect the name passed to
getPart
needs to match the
name
attribute on the
<input>
:
filepart = req.getPart("file1");
Also your alternative MIME type is incorrect - you won't have two
application/
prefixes.
if(!filepart.getContentType().equals("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"))