@chat21/chat21-ionic 3.4.7-rc.1 → 3.4.7-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/package.json +1 -1
- package/src/chat21-core/utils/utils.ts +5 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -881,6 +881,11 @@ export function checkAcceptedFile(fileType, fileUploadAccept ): boolean{
|
|
|
881
881
|
const baseMimeType = fileType.split('/')[0]; // Ottieni la parte principale del MIME type
|
|
882
882
|
return accept.replace('/*', '') === baseMimeType;
|
|
883
883
|
}
|
|
884
|
+
|
|
885
|
+
// Controlla se l'accettazione è un MIME type esatto (come image/jpeg)
|
|
886
|
+
if (accept === fileType) {
|
|
887
|
+
return true;
|
|
888
|
+
}
|
|
884
889
|
// Controlla per le estensioni di file specifiche come .pdf o .txt
|
|
885
890
|
return fileType === getMimeTypeFromExtension(accept);
|
|
886
891
|
});
|