Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[22.01] Fix yaml preview in firefox #13546

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/galaxy/datatypes/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -886,9 +886,9 @@ def get_mime(self):

def _yield_user_file_content(self, trans, from_dataset, filename, headers: Headers):
# Override non-standard application/yaml mediatype with
# non-standard text/x-yaml, so preview is shown in preview iframe,
# text/plain, so preview is shown in preview iframe,
# instead of downloading the file.
headers['content-type'] = 'text/x-yaml'
headers["content-type"] = "text/plain"
return super()._yield_user_file_content(trans, from_dataset, filename, headers)

def _looks_like_yaml(self, file_prefix: FilePrefix):
Expand Down