diff options
| author | Pitu <[email protected]> | 2019-10-12 14:37:09 +0900 |
|---|---|---|
| committer | Pitu <[email protected]> | 2019-10-12 14:37:09 +0900 |
| commit | c121bd42f38cc3bd47b68efd8cf70da158cbdf8d (patch) | |
| tree | 373833e4217d693036490b4b4e23b1e5fa4b227c /src/api/utils | |
| parent | chore: prepare for filepond (diff) | |
| download | host.fuwn.me-c121bd42f38cc3bd47b68efd8cf70da158cbdf8d.tar.xz host.fuwn.me-c121bd42f38cc3bd47b68efd8cf70da158cbdf8d.zip | |
chore: upload fixes
Diffstat (limited to 'src/api/utils')
| -rw-r--r-- | src/api/utils/Util.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/api/utils/Util.js b/src/api/utils/Util.js index d7c9623..0251cc0 100644 --- a/src/api/utils/Util.js +++ b/src/api/utils/Util.js @@ -89,6 +89,7 @@ class Util { } static getFileThumbnail(filename) { + if (!filename) return null; const ext = path.extname(filename).toLowerCase(); if (!imageExtensions.includes(ext) && !videoExtensions.includes(ext)) return null; return `${filename.slice(0, -ext.length)}.png`; |