mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Use accept param to file input to indicate supported file types in web app
Remove unused total size calculations in chat input
This commit is contained in:
parent
4223b355dc
commit
7954f39633
1 changed files with 1 additions and 3 deletions
|
@ -257,9 +257,6 @@ export const ChatInputArea = forwardRef<HTMLTextAreaElement, ChatInputProps>((pr
|
||||||
setConvertedAttachedFiles(data);
|
setConvertedAttachedFiles(data);
|
||||||
});
|
});
|
||||||
|
|
||||||
const totalSize = Array.from(files).reduce((acc, file) => acc + file.size, 0);
|
|
||||||
const totalSizeInMB = totalSize / (1024 * 1024);
|
|
||||||
|
|
||||||
// Set focus to the input for user message after uploading files
|
// Set focus to the input for user message after uploading files
|
||||||
chatInputRef?.current?.focus();
|
chatInputRef?.current?.focus();
|
||||||
}
|
}
|
||||||
|
@ -612,6 +609,7 @@ export const ChatInputArea = forwardRef<HTMLTextAreaElement, ChatInputProps>((pr
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
|
accept=".pdf,.doc,.docx,.txt,.md,.org,.jpg,.jpeg,.png,.webp"
|
||||||
multiple={true}
|
multiple={true}
|
||||||
ref={fileInputRef}
|
ref={fileInputRef}
|
||||||
onChange={handleFileChange}
|
onChange={handleFileChange}
|
||||||
|
|
Loading…
Add table
Reference in a new issue