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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user