Commit 8846c3ca authored by Marc Duez's avatar Marc Duez

server : download sequence file link added

parent 39738d43
......@@ -295,6 +295,10 @@ def test_upload():
@cache.action()
def download():
if request.env.http_origin:
response.headers['Access-Control-Allow-Origin'] = request.env.http_origin
response.headers['Access-Control-Allow-Credentials'] = 'true'
response.headers['Access-Control-Max-Age'] = 86400
"""
allows downloading of uploaded files
http://..../[app]/default/download/[filename]
......
......@@ -19,6 +19,7 @@
<table>
<thead>
<tr><td> file_name </td>
<td> </td>
<td> sampling date </td>
<td> info </td>
<td> status </td>
......@@ -34,6 +35,11 @@
<tr>
<td> {{ (filename, str) = db.sequence_file.data_file.retrieve(row.sequence_file.data_file)}}
{{=filename}}</td>
<td>
<a href="{{=URL('download',args=row.sequence_file.data_file)}}" >dl</a>
</td>
<td> {{=row.sequence_file.sampling_date}} </td>
<td> {{=row.sequence_file.info}} </td>
<td> {{if row.data_file.id == None :}}
......
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