generated from VLADIMIR/template_frontend
up
This commit is contained in:
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{i as e}from"./auth-CzuN8bsR.js";function t(e){let t=e?.file_type;if(t===`pdf`||t===`image`||t===`audio`)return t;let n=(e?.image||``).toLowerCase();return/\.pdf($|\?)/.test(n)?`pdf`:/\.(mp3|wav|ogg|m4a|aac|flac|opus)($|\?)/.test(n)?`audio`:/\.(png|jpe?g|gif|webp|bmp|svg)($|\?)/.test(n)?`image`:``}function n(t){if(!t)return``;let n=t.toLowerCase();return n.startsWith(`http://`)||n.startsWith(`https://`)?t:t.startsWith(`/`)?e()+t:`${e()}/api/files/${t}`}function r(e){return e?e.split(`/`).pop()||e:``}export{t as n,n as r,r as t};
|
||||
Reference in New Issue
Block a user