Skip to content

Commit 6ae2a86

Browse files
authored
Merge branch 'master' into bugfix/firefox-downloads
2 parents 5272a4b + 2b6c3de commit 6ae2a86

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

web-app/src/screens/Console/Buckets/ListBuckets/Objects/Preview/PreviewFileContent.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ const PreviewFile = ({
113113
"&.image": {
114114
height: 500,
115115
},
116-
"&.text": {
117-
height: 700,
118-
},
119116
"&.audio": {
120117
height: 150,
121118
},

web-app/src/screens/Console/Buckets/ListBuckets/Objects/utils.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,7 @@ class BrowserDownload {
192192
}
193193
}
194194

195-
export type AllowedPreviews =
196-
| "image"
197-
| "pdf"
198-
| "text"
199-
| "audio"
200-
| "video"
201-
| "none";
195+
export type AllowedPreviews = "image" | "pdf" | "audio" | "video" | "none";
202196
export const contentTypePreview = (contentType: string): AllowedPreviews => {
203197
if (contentType) {
204198
const mimeObjectType = (contentType || "").toLowerCase();
@@ -209,9 +203,6 @@ export const contentTypePreview = (contentType: string): AllowedPreviews => {
209203
if (mimeObjectType.includes("pdf")) {
210204
return "pdf";
211205
}
212-
if (mimeObjectType.includes("text")) {
213-
return "text";
214-
}
215206
if (mimeObjectType.includes("audio")) {
216207
return "audio";
217208
}
@@ -241,7 +232,6 @@ export const extensionPreview = (fileName: string): AllowedPreviews => {
241232
"png",
242233
"heic",
243234
];
244-
const textExtensions = ["txt"];
245235
const pdfExtensions = ["pdf"];
246236
const audioExtensions = ["wav", "mp3", "alac", "aiff", "dsd", "pcm"];
247237
const videoExtensions = [
@@ -273,10 +263,6 @@ export const extensionPreview = (fileName: string): AllowedPreviews => {
273263
return "pdf";
274264
}
275265

276-
if (textExtensions.includes(fileExtension)) {
277-
return "text";
278-
}
279-
280266
if (audioExtensions.includes(fileExtension)) {
281267
return "audio";
282268
}

0 commit comments

Comments
 (0)