Add more types
This commit is contained in:
parent
8fda8aa49a
commit
cac058b643
2 changed files with 5 additions and 2 deletions
|
|
@ -216,7 +216,7 @@ export const Landing: React.FC<LandingProps> = ({ onGenerate, onCreateManual, on
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
setIsDragging(false);
|
setIsDragging(false);
|
||||||
if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {
|
if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {
|
||||||
const acceptedTypes = ['.pdf', '.txt', '.md', '.docx', '.pptx', '.xlsx', '.odt', '.odp', '.ods', '.rtf', '.jpg', '.jpeg', '.png', '.gif', '.webp'];
|
const acceptedTypes = ['.pdf', '.txt', '.md', '.doc', '.docx', '.ppt', '.pptx', '.xls', '.xlsx', '.odt', '.odp', '.ods', '.rtf', '.jpg', '.jpeg', '.png', '.gif', '.webp'];
|
||||||
const newFiles = Array.from(e.dataTransfer.files).filter((file: File) => {
|
const newFiles = Array.from(e.dataTransfer.files).filter((file: File) => {
|
||||||
const fileExtension = '.' + file.name.split('.').pop()?.toLowerCase();
|
const fileExtension = '.' + file.name.split('.').pop()?.toLowerCase();
|
||||||
return acceptedTypes.includes(fileExtension) || file.type.startsWith('image/');
|
return acceptedTypes.includes(fileExtension) || file.type.startsWith('image/');
|
||||||
|
|
@ -479,7 +479,7 @@ export const Landing: React.FC<LandingProps> = ({ onGenerate, onCreateManual, on
|
||||||
multiple
|
multiple
|
||||||
className="hidden"
|
className="hidden"
|
||||||
onChange={handleFileSelect}
|
onChange={handleFileSelect}
|
||||||
accept=".pdf,.txt,.md,.csv,.html,.htm,.xml,.json,.js,.ts,.jsx,.tsx,.py,.java,.c,.cpp,.h,.hpp,.css,.yaml,.yml,.docx,.pptx,.xlsx,.odt,.odp,.ods,.rtf,.jpg,.jpeg,.png,.gif,.webp"
|
accept=".pdf,.txt,.md,.csv,.html,.htm,.xml,.json,.js,.ts,.jsx,.tsx,.py,.java,.c,.cpp,.h,.hpp,.css,.yaml,.yml,.doc,.docx,.ppt,.pptx,.xls,.xlsx,.odt,.odp,.ods,.rtf,.jpg,.jpeg,.png,.gif,.webp"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,9 @@ export const OFFICEPARSER_TYPES = [
|
||||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document', // .docx
|
'application/vnd.openxmlformats-officedocument.wordprocessingml.document', // .docx
|
||||||
'application/vnd.openxmlformats-officedocument.presentationml.presentation', // .pptx
|
'application/vnd.openxmlformats-officedocument.presentationml.presentation', // .pptx
|
||||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', // .xlsx
|
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', // .xlsx
|
||||||
|
'application/msword', // .doc
|
||||||
|
'application/vnd.ms-powerpoint', // .ppt
|
||||||
|
'application/vnd.ms-excel', // .xls
|
||||||
'application/vnd.oasis.opendocument.text', // .odt
|
'application/vnd.oasis.opendocument.text', // .odt
|
||||||
'application/vnd.oasis.opendocument.presentation', // .odp
|
'application/vnd.oasis.opendocument.presentation', // .odp
|
||||||
'application/vnd.oasis.opendocument.spreadsheet', // .ods
|
'application/vnd.oasis.opendocument.spreadsheet', // .ods
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue