Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for capitalized file extensions such as PDF #146

Merged
merged 1 commit into from
May 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added backend/.pandoc-3.1.2-1-arm64.deb.icloud
Binary file not shown.
2 changes: 1 addition & 1 deletion backend/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,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"}
Expand Down