mirror of
https://gitee.com/sjqzhang/go-fastdfs.git
synced 2024-11-29 17:57:41 +08:00
44 lines
1.7 KiB
HTML
44 lines
1.7 KiB
HTML
<html>
|
||
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<title>go-fastdfs</title>
|
||
<style>form { bargin } .form-line { display:block;height: 30px;margin:8px; } #stdUpload {background: #fafafa;border-radius: 10px;width: 745px; }</style>
|
||
<link href="https://transloadit.edgly.net/releases/uppy/v0.30.0/dist/uppy.min.css" rel="stylesheet"></head>
|
||
|
||
<body>
|
||
<div>标准上传(强列建议使用这种方式)</div>
|
||
<div id="stdUpload">
|
||
|
||
<form action="%s" method="post" enctype="multipart/form-data">
|
||
<span class="form-line">文件(file):
|
||
<input type="file" id="file" name="file" /></span>
|
||
<span class="form-line">场景(scene):
|
||
<input type="text" id="scene" name="scene" value="%s" /></span>
|
||
<span class="form-line">输出(output):
|
||
<input type="text" id="output" name="output" value="json" /></span>
|
||
<span class="form-line">自定义路径(path):
|
||
<input type="text" id="path" name="path" value="" /></span>
|
||
<input type="submit" name="submit" value="upload" /></form>
|
||
</div>
|
||
<div>断点续传(如果文件很大时可以考虑)</div>
|
||
<div>
|
||
|
||
|
||
<div id="drag-drop-area"></div>
|
||
<script src="https://transloadit.edgly.net/releases/uppy/v0.30.0/dist/uppy.min.js"></script>
|
||
<script>var uppy = Uppy.Core().use(Uppy.Dashboard, {
|
||
inline: true,
|
||
target: '#drag-drop-area'
|
||
}).use(Uppy.Tus, {
|
||
endpoint: '%s'
|
||
})
|
||
|
||
uppy.on('complete', (result) => {
|
||
// console.log(result) console.log('Upload complete! We’ve uploaded these files:', result.successful)
|
||
})
|
||
</script>
|
||
</div>
|
||
</body>
|
||
|
||
</html> |