0

我正在使用 Bootstrap 文件输入,这工作正常,但是当我尝试在 jsp 中获取数据文件时,我不能这样做,这是我的 html

<!DOCTYPE html>
<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/5.0.1/css/fileinput.min.css" media="all" rel="stylesheet" type="text/css" />
        <script src = "https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.3/jquery.min.js"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <script src = "https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/5.0.1/js/plugins/piexif.min.js" type = "text / javascript" ></script>  
        <script src = "https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/5.0.1/js/plugins/sortable.min.js" type = "text / javascript" > </script> 
        <script src = "https://cdnjs.cloudflare.com/ajax/libs/bootstrap-fileinput/5.0.1/js/fileinput.min.js" ></script> 
        <script src="vendor/kartik-v-bootstrap-fileinput-v5.0.7-0-g4a656ec/kartik-v-bootstrap-fileinput-4a656ec/js/locales/es.js" type="text/javascript"></script>
    </head>
    <body>
        <div class="file-loading">
            <input id="input-ficons-3" name="input-ficons-3[]" multiple type="file">
        </div>
                    <div class="file-loading">
            <input id="input-ficons-4" name="xml[]" multiple type="file" accept=".xml">
        </div>
        <script>
            $("#input-ficons-4").fileinput({
                language: "es",
                uploadUrl: "/pruebasjavaweb/grabar.jsp",
                previewFileIcon: '<i class="fa fa-file-o"></i>',
                allowedPreviewTypes: null, // disable preview of standard types
                showCaption: true,
                showRemove: false,
                showClose: false,
                showZoom: false,
                //allowedPreviewMimeTypes: ['image/jpeg', 'text/javascript'], // allow content to be shown only for certain mime types 
                previewFileIconSettings: {
                    'xml': '<i class="fa fa-file-code-o"></i>',
                    'XML': '<i class="fa fa-file-code-o"></i>',
                }
            });
        </script>
    </body>
</html>

但是当我尝试恢复我发送的文件时遇到问题

4

0 回答 0