Function raze::api::b2_upload_file[][src]

pub async fn b2_upload_file<B: Into<Body>>(
    client: &Client,
    auth: &UploadAuth,
    body: B,
    params: FileParameters<'_>
) -> Result<B2FileInfo, Error>
Expand description

https://www.backblaze.com/b2/docs/b2_upload_file.html

Needs a FileParameters containing metadata and a body that is Intoreqwest::Body containing the file bytes.
You can use [body_from_reader][crate::util::body_from_reader] to turn a file or other AsyncReads to a body.

Be aware of Sha1-checksum behavior, see Sha1Variant.
Requires an UploadAuth instead of a B2Auth.