mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-16 18:29:01 +01:00
5ec89ea0c3
* wip * Revert "Update ClientServerService.ts" This reverts commit88c64ece78
. * Revert "disable custom emoji proxy temporary" This reverts commit495d513efd
. * ✌️
9 lines
513 B
TypeScript
9 lines
513 B
TypeScript
import { FILE_TYPE_BROWSERSAFE } from '@/const.js';
|
|
|
|
const dictionary = {
|
|
'safe-file': FILE_TYPE_BROWSERSAFE,
|
|
'sharp-convertible-image': ['image/jpeg', 'image/png', 'image/gif', 'image/apng', 'image/vnd.mozilla.apng', 'image/webp', 'image/avif', 'image/svg+xml'],
|
|
'sharp-animation-convertible-image': ['image/jpeg', 'image/png', 'image/gif', 'image/webp', 'image/avif', 'image/svg+xml'],
|
|
};
|
|
|
|
export const isMimeImage = (mime: string, type: keyof typeof dictionary): boolean => dictionary[type].includes(mime);
|