添加video预览
This commit is contained in:
parent
dc449886bf
commit
35b84697cd
@ -6,7 +6,7 @@
|
||||
|
||||
body {
|
||||
user-select: none;
|
||||
max-width: 360px;
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@ -33,12 +33,13 @@ form button {
|
||||
font-size: xx-small;
|
||||
}
|
||||
|
||||
audio {
|
||||
width: 360px;
|
||||
audio,
|
||||
video {
|
||||
width: 480px;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 360px;
|
||||
width: 480px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
|
@ -28,12 +28,14 @@ html(lang='zh')
|
||||
input(id='password_input' name='password' type='password' autocomplete='off' required)
|
||||
button(id='download_button' type='submit') 下载
|
||||
if !file.password
|
||||
- var mimetype = file.mimetype.split('/')[0]
|
||||
- var src = '/file/' + file.md5
|
||||
- const mimetype = file.mimetype.split('/')[0]
|
||||
- const src = '/file/' + file.md5
|
||||
if mimetype == 'image'
|
||||
p 预览
|
||||
img(src=src)
|
||||
if mimetype == 'audio'
|
||||
p 预览
|
||||
audio(controls src=src)
|
||||
script(src='/client.js')
|
||||
if mimetype == 'video'
|
||||
p 预览
|
||||
video(controls src=src)
|
||||
|
Loading…
Reference in New Issue
Block a user