@backblaze-labs/b2-mcp
    Preparing search index...

    Function assertSafeObjectContentType

    • Reject browser-executable content types for signed upload capabilities.

      Parameters

      • contentType: string | undefined

        Content type supplied for an upload.

      • context: string

        Human-readable operation context for error messages.

      Returns void

      Presigned PutObject URLs are bearer capabilities. Requiring a specific, non-browser-executable content type reduces the blast radius if a generated URL is mishandled.

      A 400-style bad request Error when the type is missing or unsafe.