文件上传测试完成

This commit is contained in:
2018-06-23 13:23:35 +08:00
parent fc7cbcaab4
commit 080bf57378
8 changed files with 227 additions and 7 deletions

View File

@@ -0,0 +1,19 @@
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
<head th:include="dist/thymeleaf/common_head :: header('上传')">
</head>
<body>
<div th:insert="~{dist/thymeleaf/common_head :: #body_js}"></div>
<div id="app">
<el-upload class="upload-demo" ref="upload" action="/fileupload/upload/add"
:on-preview="handlePreview" :on-remove="handleRemove" :file-list="fileList" :auto-upload="false">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过100Mb</div>
</el-upload>
</div>
<script th:src="@{/js/upload.js}+'?v=0.1'"></script>
</body>
</html>