Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/397.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用Thymeleaf引导CRUD应用程序:接受视频类型_Java_Html_Spring_Spring Boot_Thymeleaf - Fatal编程技术网

Java 使用Thymeleaf引导CRUD应用程序:接受视频类型

Java 使用Thymeleaf引导CRUD应用程序:接受视频类型,java,html,spring,spring-boot,thymeleaf,Java,Html,Spring,Spring Boot,Thymeleaf,我有一个SpringBoot应用程序。使用此模板以接受所有视频类型 <!DOCTYPE HTML> <html xmlns:th="http://www.thymeleaf.org"> <head> <!-- Meta Tags --> <meta charset="UTF-8"> </head> <body class="public app ap

我有一个SpringBoot应用程序。使用此模板以接受所有视频类型

<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- Meta Tags -->
    <meta charset="UTF-8">

</head>

<body class="public app app-embed" onorientationchange="window.scrollTo(0, 1)">

<div id="form-embed">

    <div id="messages"></div>

    <form action="#" th:action="@{/adduser.html}" th:object="${user}" method="post" enctype="multipart/form-data">

        <!-- File -->
        <div class="form-group textogbcn">
            <label  for="video">Video</label>
            <input type="file" id="video"  name="files" accept="video/*">
        </div>



    </form>

</div>
</body>

</html>

视频
但似乎只接受MP4,而不接受mkv


使用Chrome v87.0.4280.88(Build of icial)(x86_64)进行测试。尝试以下解决方案作为解决方法

<input type="file" accept="video/*,.mkv">


解释

你能在JS FIDLE Accept属性上分享/演示你的项目吗。它应该接受所有的视频。您是否可以检查一下您的浏览器,如浏览器是否未更新或是否支持html 5标记等。请求检查浏览器兼容性以共享您用于测试的浏览器及其版本。与标记堆栈无关。它只与HTML5输入标记相关