Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _downloaded_files():
""" Allows the UI to request files RMD has scraped.
In format: "./file?id=file_token"
"""
token = eel.btl.request.query.id
file_obj = _session.query(sql.File).filter(sql.File.id == token).first()
file_path = file_obj.path
response = eel.btl.static_file(file_path, root=os.path.abspath(settings.get("output.base_dir")))
response.set_header("Cache-Control", "public, max-age=0")
return response