One would expect the content-type to be text/markdown according to this IETF standards filing, and IANA.
Actual behavior:
Content type is actually defined as application/x-genesis-rom. While .md is apparently a valid file format for Sega Genesis ROM files, it seems much more likely that users would be uploading Markdown files to Course Files, rather than Sega Genesis ROMs. The current behavior makes filtering by file type unintuitive when using the content_types[]query paramater to make calls to the Canvas API.
Additional notes:
Fixing this could potentially cause breaking changes for any external tools which get a list of course files from the Canvas API and explicitly filter by application/x-genesis-rom (whether for the actual purpose of Sega Genesis ROMs, or as a workaround for the incorrect mime type definition).
Summary:
As seen on line 308, the
.md
filetype is likely improperly defined asapplication/x-genesis-rom
Steps to reproduce:
https://<canvas>/api/v1/folders/<folder_id>/files
)Expected behavior:
One would expect the content-type to be
text/markdown
according to this IETF standards filing, and IANA.Actual behavior:
Content type is actually defined as
application/x-genesis-rom
. While.md
is apparently a valid file format for Sega Genesis ROM files, it seems much more likely that users would be uploading Markdown files to Course Files, rather than Sega Genesis ROMs. The current behavior makes filtering by file type unintuitive when using thecontent_types[]
query paramater to make calls to the Canvas API.Additional notes:
Fixing this could potentially cause breaking changes for any external tools which get a list of course files from the Canvas API and explicitly filter by
application/x-genesis-rom
(whether for the actual purpose of Sega Genesis ROMs, or as a workaround for the incorrect mime type definition).