mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-03 05:29:12 +00:00
Share webp images from web, desktop, obsidian app to chat with
This commit is contained in:
@@ -241,6 +241,7 @@ function getIconFromFilename(
|
||||
case "jpg":
|
||||
case "jpeg":
|
||||
case "png":
|
||||
case "webp":
|
||||
return <Image className={className} weight="fill" />;
|
||||
default:
|
||||
return <File className={className} weight="fill" />;
|
||||
|
||||
@@ -168,12 +168,12 @@ export default function ChatInputArea(props: ChatInputProps) {
|
||||
|
||||
function uploadFiles(files: FileList) {
|
||||
if (!props.isLoggedIn) {
|
||||
setLoginRedirectMessage("Whoa! You need to login to upload files");
|
||||
setLoginRedirectMessage("Please login to chat with your files");
|
||||
setShowLoginPrompt(true);
|
||||
return;
|
||||
}
|
||||
// check for image file
|
||||
const image_endings = ["jpg", "jpeg", "png"];
|
||||
const image_endings = ["jpg", "jpeg", "png", "webp"];
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const file = files[i];
|
||||
const file_extension = file.name.split(".").pop();
|
||||
|
||||
Reference in New Issue
Block a user