mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 17:01:00 +03:00
Feature/Excel and PPT File Uploads (#4896)
Enhance file upload capabilities by adding support for additional file types (html, css, js, xml, md, excel, powerpoint) and updating related MIME type mappings. Improve user interface for file type selection in FileUpload component.
This commit is contained in:
@@ -1070,7 +1070,17 @@ export const mapMimeTypeToInputField = (mimeType: string) => {
|
||||
case 'text/jsonl':
|
||||
return 'jsonlinesFile'
|
||||
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
|
||||
case 'application/msword': {
|
||||
return 'docxFile'
|
||||
}
|
||||
case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
|
||||
case 'application/vnd.ms-excel': {
|
||||
return 'excelFile'
|
||||
}
|
||||
case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
|
||||
case 'application/vnd.ms-powerpoint': {
|
||||
return 'powerpointFile'
|
||||
}
|
||||
case 'application/vnd.yaml':
|
||||
case 'application/x-yaml':
|
||||
case 'text/vnd.yaml':
|
||||
@@ -1091,6 +1101,19 @@ export const mapMimeTypeToExt = (mimeType: string) => {
|
||||
switch (mimeType) {
|
||||
case 'text/plain':
|
||||
return 'txt'
|
||||
case 'text/html':
|
||||
return 'html'
|
||||
case 'text/css':
|
||||
return 'css'
|
||||
case 'text/javascript':
|
||||
case 'application/javascript':
|
||||
return 'js'
|
||||
case 'text/xml':
|
||||
case 'application/xml':
|
||||
return 'xml'
|
||||
case 'text/markdown':
|
||||
case 'text/x-markdown':
|
||||
return 'md'
|
||||
case 'application/pdf':
|
||||
return 'pdf'
|
||||
case 'application/json':
|
||||
@@ -1109,6 +1132,10 @@ export const mapMimeTypeToExt = (mimeType: string) => {
|
||||
return 'xls'
|
||||
case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
|
||||
return 'xlsx'
|
||||
case 'application/vnd.ms-powerpoint':
|
||||
return 'ppt'
|
||||
case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
|
||||
return 'pptx'
|
||||
default:
|
||||
return ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user