@bnsights/bbsf-controls 1.0.194-beta.19-10 → 1.0.194-beta.19-11
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.
|
@@ -7179,7 +7179,10 @@ class FileUploadComponent {
|
|
|
7179
7179
|
this.acceptedType = this.acceptedTypeArray.join(',');
|
|
7180
7180
|
// Add file extension support for custom MIME types that browsers don't recognize
|
|
7181
7181
|
// For application/BN (License files), also add .bn extension to accept attribute
|
|
7182
|
-
|
|
7182
|
+
const hasLicenseType = this.acceptedTypeArray.some(acceptedType => {
|
|
7183
|
+
return acceptedType.toLowerCase().trim() === 'application/bn';
|
|
7184
|
+
});
|
|
7185
|
+
if (hasLicenseType) {
|
|
7183
7186
|
this.acceptedType = this.acceptedType + ',.bn';
|
|
7184
7187
|
}
|
|
7185
7188
|
// Process each accepted MIME type to build tooltip display names
|
|
@@ -7730,12 +7733,18 @@ class FileUploadComponent {
|
|
|
7730
7733
|
}
|
|
7731
7734
|
// Handle custom MIME types that browsers don't recognize
|
|
7732
7735
|
// For application/BN (License files), check file extension
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7736
|
+
const hasLicenseType = this.acceptedTypeArray.some(acceptedType => {
|
|
7737
|
+
return acceptedType.toLowerCase().trim() === 'application/bn';
|
|
7738
|
+
});
|
|
7739
|
+
if (hasLicenseType && fileName) {
|
|
7740
|
+
const lastDotIndex = fileName.lastIndexOf('.');
|
|
7741
|
+
if (lastDotIndex !== -1) {
|
|
7742
|
+
const fileExtension = fileName.toLowerCase().substring(lastDotIndex);
|
|
7743
|
+
if (fileExtension === '.bn') {
|
|
7744
|
+
// Accept .bn files regardless of MIME type since browsers assign
|
|
7745
|
+
// application/octet-stream or empty type to unknown file types
|
|
7746
|
+
return true;
|
|
7747
|
+
}
|
|
7739
7748
|
}
|
|
7740
7749
|
}
|
|
7741
7750
|
return false;
|