videosphere
    Preparing search index...

    Function headObject

    • Retrieve object metadata (HEAD request) from R2 bucket. Used by the upload complete endpoint to verify the actual stored byte size against the 5 GB cap. Quota is enforced earlier, at presign time, via incrementUsageIfAllowed in POST /api/uploads/presign.

      Parameters

      • key: string

        Object key in R2 bucket

      • Optionaloptions: { signal?: AbortSignal }

      Returns Promise<number>

      Actual size of the stored object in bytes (0 if ContentLength is absent)

      When the object does not exist in R2

      When the HEAD request fails for any other reason