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(): ...@@ -295,6 +295,10 @@ def test_upload():
@cache.action() @cache.action()
def download(): 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 allows downloading of uploaded files
http://..../[app]/default/download/[filename] http://..../[app]/default/download/[filename]
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<table> <table>
<thead> <thead>
<tr><td> file_name </td> <tr><td> file_name </td>
<td> </td>
<td> sampling date </td> <td> sampling date </td>
<td> info </td> <td> info </td>
<td> status </td> <td> status </td>
...@@ -34,6 +35,11 @@ ...@@ -34,6 +35,11 @@
<tr> <tr>
<td> {{ (filename, str) = db.sequence_file.data_file.retrieve(row.sequence_file.data_file)}} <td> {{ (filename, str) = db.sequence_file.data_file.retrieve(row.sequence_file.data_file)}}
{{=filename}}</td> {{=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.sampling_date}} </td>
<td> {{=row.sequence_file.info}} </td> <td> {{=row.sequence_file.info}} </td>
<td> {{if row.data_file.id == None :}} <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