even better preview!

This commit is contained in:
2025-06-01 12:46:06 +02:00
parent 3a768146c1
commit 2800da1859
2 changed files with 11 additions and 2 deletions

View File

@@ -116,7 +116,7 @@ export class FilePreview {
const encodedUrl = encodeURIComponent(file.url);
contentDiv.innerHTML = `
<iframe src="https://view.officeapps.live.com/op/embed.aspx?src=${encodedUrl}"
width="100%" height="70vh" frameborder="0"></iframe>
width="100%" height="600px" frameborder="0"></iframe>
`;
} else {
// Default preview for other file types

View File

@@ -359,7 +359,16 @@ export class ViewManager {
} else {
// Check if file type is supported for preview
const extension = file.name.split('.').pop().toLowerCase();
const supportedTypes = ['jpg', 'jpeg', 'png', 'gif', 'pdf', 'mp4', 'webm', 'mp3', 'wav'];
const supportedTypes = [
// Images
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg', 'webp', 'tiff',
// Documents
'pdf', 'txt', 'md', 'csv', 'py', 'js', 'html', 'css', 'json', 'xml', 'sql', 'sh', 'bat',
'docx', 'doc', 'xlsx', 'xls', 'pptx', 'ppt', 'odt', 'odp', 'ods',
// Media
'mp4', 'webm', 'avi', 'mov', 'wmv', 'flv', 'mkv',
'mp3', 'wav', 'ogg', 'm4a', 'flac'
];
if (supportedTypes.includes(extension)) {
actions.push(`