Issue #5507
Updated by dkliban@redhat.com about 5 years ago
The FileResponse from aiohttp tries to guess the content type by looking at the extension of the filename. The content-app is always handing the FileResponse object an Artifact file that doesn't have an extension. As a result the Content-Type cannot be inferred. We should manually mimetypes.guesstype[0] use the same function that aiohttp already provides for guessing the content type, but pass it the 'relative_path' from the content artifact. We can then use the values returned as parameters for FileResponse object. [0] https://docs.python.org/3.6/library/mimetypes.html#mimetypes.guess_type