feat(archive): add MIME types and compound-extension aliases for archive formats

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-01 12:55:56 +02:00
co-authored by Claude Sonnet 5
parent ceddeddf3e
commit a8cdb06d5c
2 changed files with 44 additions and 0 deletions
+9
View File
@@ -31,6 +31,12 @@ const OUTPUT_MIME_TYPES = {
snb: 'application/octet-stream',
tcr: 'application/octet-stream',
azw3: 'application/vnd.amazon.ebook',
zip: 'application/zip',
tar: 'application/x-tar',
'tar.gz': 'application/gzip',
'tar.bz2': 'application/x-bzip2',
'7z': 'application/x-7z-compressed',
'tar.7z': 'application/x-7z-compressed',
};
export async function detectInputMime(filePath) {
@@ -67,6 +73,9 @@ function normalizeFormat(format) {
if (format === 'heif') return 'heic';
if (format === 'azw3') return 'mobi';
if (format === 'fb2') return 'xml';
if (format === 'tar.gz') return 'gz';
if (format === 'tar.bz2') return 'bz2';
if (format === 'tar.7z') return '7z';
return format;
}