Commit 80eea121 authored by Mikaël Salson's avatar Mikaël Salson

sample_set/index.html: Download link with UTF-8 characters

Some of our users may use non-ascii charaters in patient names, therefore we
must make sure that the filename will be correctly encoded.

By the way, the useless commented code has been remove.
parent a5fe2ce9
......@@ -205,10 +205,7 @@
<div class="db_block_right">
{{if fused_file is not None :}}
download {{=db.config[config_id].name}}
<!--
<a class="button" href={{=URL('default', 'download_data', scheme='https', vars=dict(patient=request.vars["id"] ,config=request.vars["config_id"], filename=fused_filename ) )}} type="application/octet-stream" download> .data </a>
-->
<a class="button" href={{=URL('default', 'download', scheme='https', args=fused_file[0].fused_file, vars=dict(filename=fused_filename))}} type="application/octet-stream" download> .data </a>
<a class="button" href={{=URL('default', 'download', scheme='https', args=fused_file[0].fused_file, vars=dict(filename=unicode(fused_filename).encode('utf-8')))}} type="application/octet-stream" download> .data </a>
{{if analysis_count >0:}}
<a class="button" href={{=URL('default', 'download', scheme='https', args=analysis_file[0].analysis_file, vars=dict(filename=analysis_filename))}} type="application/octet-stream" download> .analysis </a>
{{pass}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment