mirror of
https://github.com/StanGirard/quivr.git
synced 2024-09-21 01:47:32 +03:00
Support for capitalized file extensions such as PDF (#146)
This commit is contained in:
parent
20ed6183b9
commit
7adcdd3d51
BIN
backend/.pandoc-3.1.2-1-arm64.deb.icloud
Normal file
BIN
backend/.pandoc-3.1.2-1-arm64.deb.icloud
Normal file
Binary file not shown.
@ -81,7 +81,7 @@ async def filter_file(file: UploadFile, enable_summarization: bool, supabase_cli
|
||||
elif file.file._file.tell() < 1:
|
||||
return {"message": f"❌ {file.filename} is empty.", "type": "error"}
|
||||
else:
|
||||
file_extension = os.path.splitext(file.filename)[-1]
|
||||
file_extension = os.path.splitext(file.filename)[-1].lower() # Convert file extension to lowercase
|
||||
if file_extension in file_processors:
|
||||
await file_processors[file_extension](file, enable_summarization)
|
||||
return {"message": f"✅ {file.filename} has been uploaded.", "type": "success"}
|
||||
|
Loading…
Reference in New Issue
Block a user