autopkgtest logs should be served as text/plain
https://debusine.debian.net/artifact/38/ shows an example of a failed autopkgtest run. It has a number of files attached. testinfo.json
is served with a reasonable Content-Type due to its extension, but all the others (log
, regress-packages
, regress-stderr
, regress-stdout
, summary
, testbed-packages
, and testpkg-version
) are really text but are served as application/octet-stream
. This makes them inconvenient to browse.
I don't think it makes sense to guess all these from their file names, since they're quite autopkgtest-specific. Perhaps we should add a nullable content_type
column to File
, and use that to allow code that uploads files to optionally override the Content-Type that will be used when serving them?