diff --git a/lib/jmap/client.ts b/lib/jmap/client.ts index db2c6868..3fde1a3a 100644 --- a/lib/jmap/client.ts +++ b/lib/jmap/client.ts @@ -4058,7 +4058,9 @@ export class JMAPClient implements IJMAPClient { async createFileNode(name: string, blobId: string, type: string, size: number, parentId: string | null): Promise { const accountId = this.getFilesAccountId(); - const fileProps: Record = { name, type, blobId, size }; + //fall back for long MIME types + const safeType = type.length > 30 ? 'application/octet-stream' : type; + const fileProps: Record = { name, type: safeType, blobId, size }; if (parentId !== null) { fileProps.parentId = parentId; }