Skip to content

Commit a07b804

Browse files
added xlxs format support
1 parent 4bf6b8b commit a07b804

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

frontend/src/components/DataSources/Local/DropZone.tsx

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,32 @@ const DropZone: FunctionComponent = () => {
205205
<Dropzone
206206
loadingComponent={isLoading && <Loader title='Uploading' />}
207207
isTesting={true}
208-
className='!bg-none'
209-
supportedFilesDescription={'Supports: PDF Files'}
208+
className='!bg-none dropzoneContainer'
209+
supportedFilesDescription={
210+
<Typography variant='body-small'>
211+
<Flex>
212+
<span>{buttonCaptions.dropzoneSpan}</span>
213+
<div className='align-self-center'>
214+
<IconButtonWithToolTip
215+
label='Source info'
216+
clean
217+
text={
218+
<Typography variant='body-small'>
219+
<Flex gap='3' alignItems='flex-start'>
220+
<span>Microsoft Office (.docx, .pptx, .xls, .xlsx)</span>
221+
<span>PDF (.pdf)</span>
222+
<span>Images (.jpeg, .jpg, .png, .svg)</span>
223+
<span>Text (.html, .txt , .md)</span>
224+
</Flex>
225+
</Typography>
226+
}
227+
>
228+
<InformationCircleIconOutline className='w-[22px] h-[22px]' />
229+
</IconButtonWithToolTip>
230+
</div>
231+
</Flex>
232+
</Typography>
233+
}
210234
dropZoneOptions={{
211235
accept: {
212236
'application/pdf': ['.pdf'],
@@ -217,6 +241,7 @@ const DropZone: FunctionComponent = () => {
217241
'application/vnd.ms-powerpoint': ['.pptx'],
218242
'application/vnd.ms-excel': ['.xls'],
219243
'text/markdown': ['.md'],
244+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':['.xlsx']
220245
},
221246
onDrop: (f: Partial<globalThis.File>[]) => {
222247
onDropHandler(f);

frontend/src/components/DataSources/Local/DropZoneForSmallLayouts.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ export default function DropZoneForSmallLayouts() {
141141
'application/vnd.ms-powerpoint': ['.pptx'],
142142
'application/vnd.ms-excel': ['.xls'],
143143
'text/markdown': ['.md'],
144+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':['.xlsx']
144145
},
145146
onDrop: (f: Partial<globalThis.File>[]) => {
146147
onDropHandler(f);

0 commit comments

Comments
 (0)