feat: add image thumbnails support (#980)

* set max image preview size to 1080x1080px
This commit is contained in:
monkeyWie
2020-06-25 15:37:13 +08:00
committed by GitHub
parent 4c20772e11
commit 6b0d49b1fc
8 changed files with 137 additions and 9 deletions

View File

@@ -86,8 +86,14 @@ export default {
download () {
return `${baseURL}/api/raw${this.req.path}?auth=${this.jwt}`
},
previewUrl () {
if (this.req.type === 'image') {
return `${baseURL}/api/preview/big${this.req.path}?auth=${this.jwt}`
}
return `${baseURL}/api/raw${this.req.path}?auth=${this.jwt}`
},
raw () {
return `${this.download}&inline=true`
return `${this.previewUrl}&inline=true`
}
},
async mounted () {