Skip to main content

list_parts

Function list_parts 

Source
pub fn list_parts(
    ctx: &Ctx,
    key: &str,
    upload_id: &str,
) -> impl Future<Output = Result<Option<Vec<StoredPart>>>> + Send + use<>
Expand description

The parts stored so far in the multipart upload upload_id of key, by part number; None when the upload no longer exists.

The R2 binding cannot list parts: this calls ListParts on R2’s S3 API (one subrequest per 1,000 parts), so it needs the R2_* settings of presign_get. In debug builds it lists the parts uploaded through the development route instead.

Free plan: one R2 class A operation per 1,000 parts.

§Errors

Error::Internal (500) when an R2_* setting is missing (release builds), or R2 answers an error.