Bugfix handling attachments MIME type / content-type as it was broken.

This commit is contained in:
the-djmaze 2022-11-16 15:14:00 +01:00
parent ee5fb1a83e
commit f4448635d1
12 changed files with 461 additions and 302 deletions

View file

@ -27,6 +27,7 @@ export class ComposeAttachmentModel extends AbstractModel {
fileName: fileName,
size: size,
tempName: '',
type: '', // application/octet-stream
progress: 0,
error: '',
@ -54,7 +55,7 @@ export class ComposeAttachmentModel extends AbstractModel {
return null === localSize ? '' : FileInfo.friendlySize(localSize);
},
mimeType: () => FileInfo.getContentType(this.fileName()),
mimeType: () => this.type() || FileInfo.getContentType(this.fileName()),
fileExt: () => FileInfo.getExtension(this.fileName()),
iconClass: () => FileInfo.getIconClass(this.fileExt(), this.mimeType())