提交时我的表单有问题。出现一条消息,要求我输入有效的mimetype值。我找不到matlab mimetype的确切值。请你帮帮我。 这是源代码:
<!DOCTYPE html>
<html dir="ltr"
lang="fr-FR"
xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="X-UA-Compatible"
content="IE=10"/>
<meta http-equiv="Content-type"
content="text/html; charset=utf-8"/>
<meta http-equiv="Expires"
content="0"/>
<title th:text="${@environment.getProperty('spring.application.title') + ' - ' + serviceTitle} + ' - Livrer le DDX'"></title>
<link id="favicon"
type="image/vnd.microsoft.icon"
rel="shortcut icon"
href="images/favicon.ico"/>
<meta name="viewport"
content="width=device-width, initial-scale=1"/>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js" type="text/javascript"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"></script>
<link id="mainCSS" type="text/css" rel="stylesheet" href="css/mainBS.css"/>
<link id="workflowStageCSS" type="text/css" rel="stylesheet" href="css/workflow-stage.css"/>
<link id="uploadDDXCSS" type="text/css" rel="stylesheet" href="css/uploadDDX.css"/>
<script src="http://code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="http://cdn.jsdelivr.net/jquery.validation/1.14.0/jquery.validate.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
</head>
<body> <div class="articleBody">
<form id="ddxForm" name="ddxForm" method="POST" enctype="multipart/form-data" th:action="${@environment.getProperty('server.context-path') + 'uploadDDX'}" >
<p class="ddx-block">
<label id="ddx-file-label"
for="ddx-file" class="ddx-file-label"
>Fichier matlab(*):</label> <input id="ddx-file"
type="file"
name="ddx-file"
class="ddx-file"
accept=".m"
th:required="true"/>
</p><div><hr />
<input id="ddx-next" name="ddx-next"
type="submit" value="Continuer >>"/> <hr /></div>
</form></div>
</article>
</section>
</section>
</section>
<script>
jQuery.validator.setDefaults({
success:"valid"
});
$("#ddxForm").validate({
rules:{
"ddx-file":{
required:true,
extension:"m"
}
}
});
</script>
</body>
</html>