diff options
| author | Pitu <[email protected]> | 2020-12-25 03:08:53 +0900 |
|---|---|---|
| committer | Pitu <[email protected]> | 2020-12-25 03:08:53 +0900 |
| commit | 493e05df27ba3b2c6fbd36547f0c7aa1699e038c (patch) | |
| tree | 3ed2812b4a5717d9c3832f0a3aa2baec8fcf8c3e /src/api | |
| parent | Fix: use webp for thumbnails (diff) | |
| download | host.fuwn.me-493e05df27ba3b2c6fbd36547f0c7aa1699e038c.tar.xz host.fuwn.me-493e05df27ba3b2c6fbd36547f0c7aa1699e038c.zip | |
Fix: thumbnail creation
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/structures/Server.js | 1 | ||||
| -rw-r--r-- | src/api/utils/ThumbUtil.js | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/api/structures/Server.js b/src/api/structures/Server.js index cf2a781..865419d 100644 --- a/src/api/structures/Server.js +++ b/src/api/structures/Server.js @@ -92,6 +92,7 @@ class Server { start() { jetpack.dir('uploads/chunks'); jetpack.dir('uploads/thumbs/square'); + jetpack.dir('uploads/thumbs/preview'); this.registerAllTheRoutes(); this.serveNuxt(); const server = this.server.listen(this.port, () => { diff --git a/src/api/utils/ThumbUtil.js b/src/api/utils/ThumbUtil.js index 925c09a..051bdd9 100644 --- a/src/api/utils/ThumbUtil.js +++ b/src/api/utils/ThumbUtil.js @@ -83,7 +83,7 @@ class ThumbUtil { if (isImage) return { thumb: `${filename.slice(0, -ext.length)}.webp` }; if (isVideo) { return { - thumb: `${filename.slice(0, -ext.length)}.png`, + thumb: `${filename.slice(0, -ext.length)}.webp`, preview: `${filename.slice(0, -ext.length)}.webm` }; } |