Files
OnlyOffice-Backend/target/classes/templates/index.html
T

56 lines
1.8 KiB
HTML
Raw Normal View History

2024-03-14 09:05:00 +08:00
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">
<head th:replace="/_fragments :: head(~{::title})">
<meta charset="UTF-8">
<title>文件管理</title>
<link href="../static/layui/css/layui.css" rel="stylesheet"/>
<script src="../static/layui/layui.js" type="text/javascript"></script>
<script type="text/javascript" src="../static/js/style.js"></script>
2024-02-26 14:14:18 +08:00
</head>
2024-03-14 09:05:00 +08:00
2024-02-26 14:14:18 +08:00
<body>
2024-03-14 09:05:00 +08:00
<div style="padding: 10px">
<div class="layui-upload" >
<button type="button" class="layui-btn demo-class-accept" lay-options="{accept: 'file'}">
<i class="layui-icon layui-icon-upload"></i>
上传文件
</button>
2024-02-26 14:14:18 +08:00
</div>
2024-03-14 09:05:00 +08:00
</div>
<div class="layui-card">
<div class="layui-card-header"></div>
<div class="layui-card-body">
<p>不要以127.0.0.1或者localhost访问demo。</p>
<p>demo提供了在线编辑,转换的示例。只要是onlyoffice支持的类型</p>
<p>demo中正文和历史文件都放在了一起,具体使用时按自己的业务进行区分,分表或加字段进行区分。</p>
2024-02-26 14:14:18 +08:00
</div>
2024-03-14 09:05:00 +08:00
</div>
<div>
2024-02-26 14:14:18 +08:00
2024-03-14 09:05:00 +08:00
</div>
2024-02-26 14:14:18 +08:00
2024-03-14 09:05:00 +08:00
<table class="layui-hide" id="fileTable" lay-skin="line" lay-even lay-filter="fileTable"></table>
2024-02-26 14:14:18 +08:00
2024-03-14 09:05:00 +08:00
<script th:inline="javascript">
// var meId = /*[[${meId}]]*/ 'Sebastian';
$(function () {
upload.render({
elem: '.demo-class-accept', // 绑定多个元素
url: '/files/upload', // 此处配置你自己的上传接口即可
accept: 'file', // 普通文件
done: function(res){
layer.msg(res.message,function (){
fileTable.reload("fileTable");
})
},
error:function (){
layer.msg("上传失败")
2024-02-26 14:14:18 +08:00
}
});
2024-03-14 09:05:00 +08:00
})
</script>
2024-02-26 14:14:18 +08:00
</body>
2024-03-14 09:05:00 +08:00
</html>