文件上传测试完成
This commit is contained in:
19
src/main/resources/templates/home/upload.html
Normal file
19
src/main/resources/templates/home/upload.html
Normal 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>
|
||||
Reference in New Issue
Block a user