mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-15 04:45:45 +01:00
chore (rewrite): find mimetype
This commit is contained in:
parent
aa01a752e1
commit
bc29e4fff2
1 changed files with 1 additions and 1 deletions
|
|
@ -35,5 +35,5 @@ export function opener(file = "", mimes) {
|
|||
}
|
||||
|
||||
function getMimeType(file, mimes = {}) {
|
||||
return mimes[file.split(".")[1]] || "text/plain";
|
||||
return mimes[file.split(".").slice(-1)[0]] || "text/plain";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue