file uploads

This commit is contained in:
2025-07-13 07:17:40 +02:00
parent 11105c074f
commit 548dd7e9ef
14 changed files with 451 additions and 13 deletions

30
frontend/utils/icons.ts Normal file
View File

@@ -0,0 +1,30 @@
export function getFileIcon(fileType: string) {
if (fileType.startsWith('image/')) {
return 'lucide:file-image';
}
if (fileType.startsWith('video/')) {
return 'lucide:file-video-2';
}
if (fileType.startsWith('audio/')) {
return 'lucide:file-audio-2';
}
if (fileType.startsWith('application/')) {
if (fileType === 'application/x-msdownload') {
return 'lucide:file-box';
}
if (fileType === 'application/json') {
return 'lucide:file-json';
}
if (fileType === 'application/pdf') {
return 'lucide:file-text';
}
}
if (fileType === 'text/html') {
return 'lucide:file-code';
}
return 'lucide:file';
}