Exemple #1
0
def api_exportArchive(simulation_type, simulation_id, filename):
    req = http_request.parse_params(
        filename=filename,
        id=simulation_id,
        type=simulation_type,
    )
    from sirepo import exporter
    return exporter.create_archive(req)
Exemple #2
0
def api_exportArchive(simulation_type, simulation_id, filename):
    from sirepo import exporter
    fn, mt = exporter.create_archive(simulation_type, simulation_id, filename)
    return flask.send_file(
        str(fn),
        as_attachment=True,
        attachment_filename=filename,
        mimetype=mt,
    )
Exemple #3
0
def api_exportArchive(simulation_type, simulation_id, filename):
    from sirepo import exporter
    fn, mt = exporter.create_archive(simulation_type, simulation_id, filename)
    return flask.send_file(
        str(fn),
        as_attachment=True,
        attachment_filename=filename,
        mimetype=mt,
        #TODO(pjm): the browser caches HTML files, may need to add explicit times
        # to other calls to send_file()
        cache_timeout=1,
    )