Mandatory Header Error

The following error occurs when the mandatory x-ms-blob-type header is not specified in the request header for the Put Blob (file) operation:

An HTTP header that's mandatory for this request is not specified.

Solution: Ensure that you specify the mandatory header x-ms-blob-type in the request. This header is essential for the Put Blob (file) operation. For example: x-ms-blob-type = BlockBlob.

Note:

In addition to the x-ms-blob-type header, there are other mandatory fields required for various operations in Azure Blob Storage. If any of these mandatory fields are not specified, you may encounter similar errors indicating that a required header or parameter is missing. To prevent such errors, ensure that all required headers and parameters are included in your requests. To learn more about mandatory fields of operations, see Azure Blob Storage REST API.