Skip to contents

Call once in the server function to set up the directory that stream_path and stream_to_js will write to. When running inside a shidashi template the directory is automatically resolved from the template root; when running in plain Shiny a temporary directory is created and registered with addResourcePath so that the browser can fetch stream/{token}_{id}.bin. An optional cleanup hook is registered to remove this session's files when the session ends.

Usage

stream_init(session = shiny::getDefaultReactiveDomain())

Arguments

session

Shiny session object. Defaults to the currently active reactive domain.

Value

Invisibly returns the absolute path to the stream directory.