Skip to content

Commit 18e8822

Browse files
committed
wc: Fix file-preview to mark files with extension bigWig and pbi as binary #TASK-7450 #TASK-7100
1 parent 14eb7ea commit 18e8822

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/webcomponents/file/file-preview.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default class FilePreview extends LitElement {
6666
this.filesWithContent = [];
6767

6868
// list with the known binary extensions that we can not fetch the content
69-
this._binaryExtensions = new Set(["tbi", "bai", "zip"]);
69+
this._binaryExtensions = new Set(["tbi", "bai", "zip", "bigWig", "pbi"]);
7070

7171
this._config = this.getDefaultConfig();
7272
}
@@ -137,7 +137,8 @@ export default class FilePreview extends LitElement {
137137
// 2. Fetch the content of each file and extend the file object with the format and content
138138
for (const fileWithContent of this.filesWithContent) {
139139
let format = fileWithContent.format;
140-
if (format === "UNKNOWN") {
140+
// Note: the PLAIN format has been included also as bigWig files are being returned as PLAIN
141+
if (format === "UNKNOWN" || format === "PLAIN") {
141142
if (fileWithContent.name.endsWith(".html")) {
142143
format = "HTML";
143144
} else if (fileWithContent.name.endsWith(".pdf")) {

0 commit comments

Comments
 (0)