When the user exports a dashboard in the viewer, the result can be sent back to the server and saved, through the onEndExportReport event.

Save the exported bytes in the event.
def endExportReport(args: StiExportEventArgs):
    filePath = os.path.normpath(os.getcwd() +
        url_for('static', filename='reports/' + args.fileName))
    with open(filePath, mode='wb') as file:
        file.write(args.data)
    return f'The exported dashboard was saved to {args.fileName}.'

viewer.onEndExportReport += endExportReport

How it works. The exported file travels from the client viewer to the Python event, so exports can be stored server-side automatically.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.