Fix file save path

This commit is contained in:
Patrick Jentsch 2019-10-29 13:56:32 +01:00
parent b4d2093986
commit 0a8f6a5a44
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ def corpus(corpus_id):
return redirect(url_for('main.corpus', corpus_id=corpus_id)) return redirect(url_for('main.corpus', corpus_id=corpus_id))
# Gather information to create new corpus file database entry # Gather information to create new corpus file database entry
author = add_corpus_file_form.author.data author = add_corpus_file_form.author.data
dir = os.path.join(str(corpus.user_id), 'jobs', str(corpus.id)) dir = os.path.join(str(corpus.user_id), 'corpora', str(corpus.id))
file = add_corpus_file_form.file.data file = add_corpus_file_form.file.data
publishing_year = add_corpus_file_form.publishing_year.data publishing_year = add_corpus_file_form.publishing_year.data
title = add_corpus_file_form.title.data title = add_corpus_file_form.title.data

View File

@ -69,7 +69,7 @@
<td>{{ file.publishing_year }}</td> <td>{{ file.publishing_year }}</td>
<td class="right-align"> <td class="right-align">
<a class="waves-effect waves-light btn-small"><i class="material-icons">edit</i></a> <a class="waves-effect waves-light btn-small"><i class="material-icons">edit</i></a>
<a class="waves-effect waves-light btn-small"><i class="material-icons">file_download</i></a> <a class="waves-effect waves-light btn-small" href="{{ url_for('main.corpus_download', corpus_file_id=file.id, corpus_id=corpus.id) }}"><i class="material-icons">file_download</i></a>
<a class="waves-effect waves-light btn-small red"><i class="material-icons">delete</i></a> <a class="waves-effect waves-light btn-small red"><i class="material-icons">delete</i></a>
</td> </td>
</tr> </tr>