Skip to content

Commit

Permalink
Merge pull request #108 from tjmlabs/csv-bug-fix
Browse files Browse the repository at this point in the history
Handle csv mime type
  • Loading branch information
Jonathan-Adly authored Dec 4, 2024
2 parents 69c183d + 388ce36 commit 0a7c52f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
from django_stubs_ext.db.models import TypedModelMeta
from pdf2image import convert_from_bytes
from pgvector.django import HalfVectorField
from tenacity import retry, retry_if_exception_type, stop_after_attempt, wait_fixed
from tenacity import (retry, retry_if_exception_type, stop_after_attempt,
wait_fixed)

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -52,6 +53,7 @@ def get_extension_from_mime(mime_type):
"image/png": ".png",
"image/gif": ".gif",
"application/pdf": ".pdf",
"application/csv": ".csv",
}

if mime_type in hardcode_mimetypes:
Expand Down

0 comments on commit 0a7c52f

Please sign in to comment.