jstd-web/node_modules/@uppy/utils/lib/isPreviewSupported.js

9 lines
249 B
JavaScript

"use strict";
function isPreviewSupported(fileType) {
if (!fileType) return false; // list of images that browsers can preview
return /^[^/]+\/(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(fileType);
}
module.exports = isPreviewSupported;