1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 14:40:00 +00:00

Change torrent Content-Disposition back to inline

As per comments in #288, Firefox forces a "what do you want to do with this"-dialog for 'attachment' even when it's set to open them immediately in another program.
This commit is contained in:
Anna-Maria Meriniemi 2017-08-03 11:28:21 +03:00 committed by GitHub
parent 87dd95f1e0
commit 95e35a10c9

View file

@ -169,7 +169,7 @@ def download_torrent(torrent_id):
flask.abort(404) flask.abort(404)
torrent_file, torrent_file_size = _get_cached_torrent_file(torrent) torrent_file, torrent_file_size = _get_cached_torrent_file(torrent)
disposition = 'attachment; filename="{0}"; filename*=UTF-8\'\'{0}'.format( disposition = 'inline; filename="{0}"; filename*=UTF-8\'\'{0}'.format(
quote(torrent.torrent_name.encode('utf-8'))) quote(torrent.torrent_name.encode('utf-8')))
resp = flask.Response(torrent_file) resp = flask.Response(torrent_file)