Skip to content

Commit

Permalink
🔉 feat: Extend text mimeTypes to support VTT (#4770)
Browse files Browse the repository at this point in the history
* Extend text mimeTypes to support VTT

* remove log entry
  • Loading branch information
DenisPalnitsky authored Nov 23, 2024
1 parent ead9e11 commit fe78210
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/data-provider/src/file-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const fullMimeTypesList = [
'text/x-tex',
'text/plain',
'text/css',
'text/vtt',
'image/jpeg',
'text/javascript',
'image/gif',
Expand Down Expand Up @@ -109,7 +110,7 @@ export const excelMimeTypes =
/^application\/(vnd\.ms-excel|msexcel|x-msexcel|x-ms-excel|x-excel|x-dos_ms_excel|xls|x-xls|vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet)$/;

export const textMimeTypes =
/^(text\/(x-c|x-csharp|x-c\+\+|x-java|html|markdown|x-php|x-python|x-script\.python|x-ruby|x-tex|plain|css|javascript|csv))$/;
/^(text\/(x-c|x-csharp|x-c\+\+|x-java|html|markdown|x-php|x-python|x-script\.python|x-ruby|x-tex|plain|css|vtt|javascript|csv))$/;

export const applicationMimeTypes =
/^(application\/(epub\+zip|csv|json|pdf|x-tar|typescript|vnd\.openxmlformats-officedocument\.(wordprocessingml\.document|presentationml\.presentation|spreadsheetml\.sheet)|xml|zip))$/;
Expand Down Expand Up @@ -147,7 +148,7 @@ export const codeTypeMapping: { [key: string]: string } = {
};

export const retrievalMimeTypes = [
/^(text\/(x-c|x-c\+\+|html|x-java|markdown|x-php|x-python|x-script\.python|x-ruby|x-tex|plain|xml))$/,
/^(text\/(x-c|x-c\+\+|html|x-java|markdown|x-php|x-python|x-script\.python|x-ruby|x-tex|plain|vtt|xml))$/,
/^(application\/(json|pdf|vnd\.openxmlformats-officedocument\.(wordprocessingml\.document|presentationml\.presentation)))$/,
];

Expand Down

0 comments on commit fe78210

Please sign in to comment.