mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(embed): detect uppercase extension in link
This commit is contained in:
@@ -56,7 +56,8 @@ export const getLinkMediaInfo = memoize(
|
|||||||
let mime: string | undefined;
|
let mime: string | undefined;
|
||||||
|
|
||||||
try {
|
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) {
|
||||||
if (mime.startsWith('image')) {
|
if (mime.startsWith('image')) {
|
||||||
type = mime === 'image/gif' ? 'gif' : 'image';
|
type = mime === 'image/gif' ? 'gif' : 'image';
|
||||||
|
|||||||
Reference in New Issue
Block a user