Expand description
This crate provides functionality for uploading files to Internet Computer canisters.
It includes utilities for splitting files into chunks, converting data to blob strings,
and interfacing with the dfx
command-line tool to upload data to canisters.
Modules§
- parallel
- Parallel chunk uploader for Internet Computer canisters
Structs§
- Upload
Config - Configuration for upload operations with retry and resume capabilities.
- Upload
Params - Parameters for uploading file chunks to a canister
Enums§
- Chunk
Upload Result - Result of a chunk upload operation
Constants§
- MAX_
CANISTER_ HTTP_ PAYLOAD_ SIZE - The maximum size of the HTTP payload for canister updates, set to 2 MiB.
Functions§
- create_
error_ string - Creates a formatted error string.
- dfx
- Executes a dfx command with the specified arguments.
- split_
into_ chunks - Splits the data into chunks.
- upload_
chunk - Uploads a chunk of data to the specified canister method.
- upload_
chunk_ with_ config - Uploads a single chunk with retry logic based on the provided configuration.
- upload_
chunks_ with_ resume - Uploads multiple chunks with comprehensive error handling and resume capability.
- vec_
u8_ to_ blob_ string - Converts a vector of bytes to a blob string.