def media(filename): media_root = Path.cwd() / Path(current_app.config.get('MEDIA_ROOT')) return send_from_directory(media_root, filename)