@filerobot/utils
Advanced tools
Comparing version 0.0.0-beta.61 to 0.0.0-beta.62
@@ -8,8 +8,2 @@ import getFileNameAndExtension from './getFileNameAndExtension'; | ||
var type = file.mime || file.type || ((_file$data = file.data) === null || _file$data === void 0 ? void 0 : _file$data.type) || ((_file$meta = file.meta) === null || _file$meta === void 0 ? void 0 : _file$meta.img_type); | ||
if (type) { | ||
return type; | ||
} | ||
var fileExtension = file.name ? getFileNameAndExtension(file.name).extension : null; | ||
@@ -21,6 +15,12 @@ fileExtension = fileExtension ? fileExtension.toLowerCase() : null; | ||
return mimeTypes[fileExtension]; | ||
} else { | ||
// if all fails, fall back to a generic byte stream type | ||
return 'application/octet-stream'; | ||
} | ||
var type = file.mime || file.type || ((_file$data = file.data) === null || _file$data === void 0 ? void 0 : _file$data.type) || ((_file$meta = file.meta) === null || _file$meta === void 0 ? void 0 : _file$meta.img_type); | ||
if (type) { | ||
return type; | ||
} // if all fails, fall back to a generic byte stream type | ||
return 'application/octet-stream'; | ||
} |
@@ -6,3 +6,3 @@ { | ||
"types": "types/index.d.ts", | ||
"version": "0.0.0-beta.61", | ||
"version": "0.0.0-beta.62", | ||
"files": [ | ||
@@ -15,3 +15,3 @@ "/dist", | ||
"dependencies": { | ||
"@filerobot/icons": "0.0.0-beta.61", | ||
"@filerobot/icons": "0.0.0-beta.62", | ||
"abortcontroller-polyfill": "^1.4.0", | ||
@@ -18,0 +18,0 @@ "lodash.throttle": "^4.1.1" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
118064
2526
+ Added@filerobot/icons@0.0.0-beta.62(transitive)
- Removed@filerobot/icons@0.0.0-beta.61(transitive)