Closed rsto closed 3 weeks ago
The problem here is that if a user uploads a JPEG to use as a contact avatar, we lose the type when creating the PHOTO property.
Right, that applies to the current non-standard JMAP Addressbook implementation. In JMAP, it would be up to the client to define the media type of the blob that they are embedding in the contact. Making this as Draft until that's resolved.
Turns out the current experimental API already provides the type
property.
JMAP blobs are untyped and storing the client-supplied media type may result in Cyrus message blobs having a wrong Content-Type header. This changes the JMAP blob upload handler to store blobs as
application/octet-stream
content, unless the uploaded blob is of typemessage/rfc822
and the blob passes our checks for valid messages of that type.