Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
8846c3ca
Commit
8846c3ca
authored
Apr 10, 2014
by
Marc Duez
Browse files
server : download sequence file link added
parent
39738d43
Changes
2
Hide whitespace changes
Inline
Side-by-side
server/web2py/applications/Vidjil/controllers/default.py
View file @
8846c3ca
...
...
@@ -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]
...
...
server/web2py/applications/Vidjil/views/default/patient.html
View file @
8846c3ca
...
...
@@ -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 :}}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment