mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 07:08:02 +00:00
fix(front): handle wildcard file type acceptance in FileUpload component to improve file upload flexibility
This commit is contained in:
@@ -22,6 +22,9 @@ const { isOverDropZone } = useDropZone(dropZoneRef, {
|
||||
dataTypes: (types) => {
|
||||
for (const type of types) {
|
||||
for (const acceptType of accept.value.split(',')) {
|
||||
if (acceptType === '*') {
|
||||
return true
|
||||
}
|
||||
if (acceptType?.endsWith('*')) {
|
||||
const [acceptTypePrefix,] = acceptType?.split('/')
|
||||
if (!acceptTypePrefix) {
|
||||
|
||||
Reference in New Issue
Block a user