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