Skip to content

Commit 3726921

Browse files
authored
improve content type to extension logic
1 parent 3af0bde commit 3726921

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ts/util/Attachment.std.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ export const getFileExtension = (
772772
case 'audio/mpeg':
773773
return 'mp3';
774774
default:
775-
return attachment.contentType.split('/')[1];
775+
return attachment.contentType.split('/')[1].split(/[+;]/)[0].trim();
776776
}
777777
};
778778

0 commit comments

Comments
 (0)