Crate ic_file_uploader

Source
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.

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.
vec_u8_to_blob_string
Converts a vector of bytes to a blob string.