Skip to main content

head_object

Function head_object 

Source
pub async fn head_object(
    client: &Client,
    bucket: &str,
    key: &str,
    version_id: Option<String>,
) -> Result<ObjectHead, AppError>
Expand description

Fetch only HeadObject for a single S3 object, returning an ObjectHead.

Lighter than inspect_object — no parallel GetObjectTagging or GetObjectAcl calls. Used by the preview pane for MIME-type detection and size-limit checks before deciding which renderer to show.

§Errors

Returns AppError::NotFound if the key does not exist, AppError::Auth on AccessDenied, and AppError::Network for other S3 errors.