Closed buptzhoutian closed 2 years ago
It depends on browsers too.
e.g
.log
Chrome can load .log
files in an iframe for Preview
Firefox Will not load.
.txt
for .txt
both browsers will display.
It depends on browsers too.
e.g
.log
Chrome can load.log
files in an iframe for Preview Firefox Will not load.
.txt
for.txt
both browsers will display.
I have tried MinIO Console RELEASE.2022-05-19T18-20-59Z
on Microsoft Edge and Chrome, neither one can preview .log
file, the button is disabled.
as per code the below are the supported extensions for preview. so for the button to be enabled, it should fall into one of it.
export const extensionPreview = (
fileName: string
): "image" | "text" | "audio" | "video" | "none" => {
const imageExtensions = [
"jif",
"jfif",
"apng",
"avif",
"svg",
"webp",
"bmp",
"ico",
"jpg",
"jpe",
"jpeg",
"gif",
"png",
"heic",
];
const textExtensions = ["pdf", "txt", "json"];
const audioExtensions = ["wav", "mp3", "alac", "aiff", "dsd", "pcm"];
const videoExtensions = [
"mp4",
"avi",
"mpg",
"webm",
"mov",
"flv",
"mkv",
"wmv",
"avchd",
"mpeg-4",
];
We stopping previewing text files for security reasons. The alternative is to generate a share link and paste it in another tab.
For example, one file named
service.log
was uploaded to MinIO, the Content-Type of this object is "text/plain".This
service.log
file can't be previewed. However, the same file uploaded asservice.log.txt
can be previewed.