@takagaki/cortex-decisions-viewer 0.4.16 → 0.4.17
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/dist/render.js +7 -3
- package/package.json +1 -1
package/dist/render.js
CHANGED
|
@@ -719,12 +719,16 @@ const CLIENT_JS = `
|
|
|
719
719
|
fileListEl.appendChild(el("span", { class: "file-chip" }, [el("span", { text: f.name }), x]));
|
|
720
720
|
});
|
|
721
721
|
}
|
|
722
|
+
function isAllowed(f) {
|
|
723
|
+
// 資料は画像をMIMEで全面許可(拡張子が取れない/変則的でも通す)。文字起こしは拡張子判定のみ。
|
|
724
|
+
if (!isT && f.type && f.type.indexOf("image/") === 0) return true;
|
|
725
|
+
var ext = extOf(f.name);
|
|
726
|
+
return !!(ext && allowedExt[ext]);
|
|
727
|
+
}
|
|
722
728
|
function addFiles(list) {
|
|
723
729
|
var rejected = [];
|
|
724
730
|
Array.prototype.slice.call(list || []).forEach(function (f) {
|
|
725
|
-
|
|
726
|
-
if (!ext || !allowedExt[ext]) { rejected.push(f.name); return; }
|
|
727
|
-
selectedFiles.push(f);
|
|
731
|
+
if (isAllowed(f)) selectedFiles.push(f); else rejected.push(f.name || "(名前なし)");
|
|
728
732
|
});
|
|
729
733
|
renderFiles();
|
|
730
734
|
update();
|
package/package.json
CHANGED