Support additional mimetypes for text-based file attachments.

Review Request #12730 — Created Nov. 18, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

This adds support for various alternative JSON mimetypes and YAML
mimetypes, ensuring that thumbnails display content correctly and that
they can be reviewed as text files when using an application/
mimetype.

The text-based review UI uses the text-based mimetype as the basis for
the list of supported mimetypes, so these won't get out of sync.

Unit tests pass.

Manually tested with the new mimetypes, ensuring that thumbnails and
reviews worked correctly.

Verified the fix with a customer.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Support additional mimetypes for text-based file attachments.
This adds support for various alternative JSON mimetypes and YAML mimetypes, ensuring that thumbnails display content correctly and that they can be reviewed as text files when using an `application/` mimetype. The text-based review UI uses the text-based mimetype as the basis for the list of supported mimetypes, so these won't get out of sync.
b44fba9c03d533166a56bd96ed57a48bc989dc63 Christian Hammond
reviewboard/attachments/mimetypes.py
reviewboard/reviews/ui/text.py
Loading...