fix: allow application/json in txt embeds

This commit is contained in:
ryan 2023-08-28 20:59:27 +08:00
parent 7bd3b8c7e1
commit c4daa968c6
1 changed files with 1 additions and 0 deletions

View File

@ -39,6 +39,7 @@ export const EmbedText = ({ data }: { data: Embeddable }) => {
EmbedText.embeddable = (data: Embeddable) => {
if (data.type.startsWith('text/')) return true;
if (data.type === 'application/json') return true;
if (getFileLanguage(data.displayName)) return true;
if (data.size > MAX_SIZE) return false;
return false;