Module juicehost

Module juicehost 

Source
Expand description

Communication with the juicehost storage backend.

Provides streaming and buffered push operations, file rename, and file deletion. Every function authenticates via JUICEHOST_API_KEY and identifies the origin via JUICEBACK_ORIGIN.

Functions§

delete_file_on_juicehost
juicehost_headers đź”’
Build the authentication and origin headers sent to juicehost.
push_file_path_to_juicehost
Push a file from a local path to juicehost. Used as a staging step for TUS uploads that need temporary local storage. The file is deleted from juiceback’s disk after the push.
push_file_streaming
Stream a file to juicehost by piping chunks from a channel straight into the HTTP body. Never keeps the whole file in memory. Close the sender to signal EOF.
push_file_to_juicehost
Send raw bytes to juicehost. The file lands on juicehost’s disk, not juiceback’s. Pass a host override or None to use the default URL.
rename_file_on_juicehost