output name and download disposition

This commit is contained in:
boyska 2014-02-24 15:20:45 +01:00
parent bd8850b6a2
commit 1f80488bbf
2 changed files with 3 additions and 2 deletions

View file

@ -5,6 +5,6 @@ DB_URI = 'sqlite:///techrec.db'
AUDIO_OUTPUT = 'output/'
AUDIO_INPUT = 'rec/'
AUDIO_INPUT_FORMAT = '%Y-%m/%d/rec-%Y-%m-%d-%H-%M-%S.mp3'
AUDIO_OUTPUT_FORMAT = 'techrec-%(time)s-%(name)s'
AUDIO_OUTPUT_FORMAT = 'techrec-%(time)s-%(name)s.mp3'
FORGE_TIMEOUT = 20
FORGE_MAX_DURATION = 3600*5

View file

@ -259,7 +259,8 @@ class RecServer:
self._app.route('/output/<filepath:path>',
callback=lambda filepath:
static_file(filepath,
root=get_config()['AUDIO_OUTPUT']))
root=get_config()['AUDIO_OUTPUT'],
download=True))
self._app.route('/static/<filepath:path>',
callback=lambda filepath: static_file(filepath,
root='static/'))