quivr/frontend/lib/helpers/acceptedFormats.ts
Nicholas Coles 8d4980cf78
Feat: Bibtex file uploads (#2398)
# Description

Added ability to upload .bib files to brain using langchain bibtex
document loader. Also changed frontend to allow the choosing of said
file.

Looking for guidance on how to run unit tests locally!

## Checklist before requesting a review

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented hard-to-understand areas
- [x] I have ideally added tests that prove my fix is effective or that
my feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged
2024-04-02 10:51:16 -07:00

32 lines
1.0 KiB
TypeScript

import { SupportedFileExtensionsWithDot } from "@/lib/types/SupportedFileExtensions";
export const acceptedFormats: Record<string, SupportedFileExtensionsWithDot[]> =
{
"text/plain": [".txt"],
"text/csv": [".csv"],
"text/markdown": [".md", ".markdown"],
"audio/x-m4a": [".m4a"],
"audio/mpeg": [".mp3", ".mpga", ".mpeg"],
"audio/webm": [".webm"],
"video/mp4": [".mp4"],
"audio/wav": [".wav"],
"application/pdf": [".pdf"],
"text/html": [".html"],
"text/telegram": [".telegram"],
"application/vnd.openxmlformats-officedocument.presentationml.presentation":
[".pptx"],
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": [
".docx",
],
"application/vnd.oasis.opendocument.text": [".odt"],
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [
".xlsx",
".xls",
],
"application/epub+zip": [".epub"],
"application/x-ipynb+json": [".ipynb"],
"text/x-python": [".py"],
"text/bib": [".bib"]
};