mirror of
https://github.com/plebbit/seedit.git
synced 2026-04-27 10:40:22 -04:00
fix(embed): detect uppercase extension in link
This commit is contained in:
@@ -55,7 +55,8 @@ export const getLinkMediaInfo = memoize(
|
||||
let mime: string | undefined;
|
||||
|
||||
try {
|
||||
mime = extName(url.pathname.slice(url.pathname.lastIndexOf('/') + 1))[0]?.mime;
|
||||
const fileName = url.pathname.slice(url.pathname.lastIndexOf('/') + 1).toLowerCase();
|
||||
mime = extName(fileName)[0]?.mime;
|
||||
if (mime) {
|
||||
if (mime.startsWith('image')) {
|
||||
type = mime === 'image/gif' ? 'gif' : 'image';
|
||||
|
||||
Reference in New Issue
Block a user