Open
Description
- Package Name: azure-blob
- Package Version: 12.24.0
- Operating system: MacOS
- nodejs
- version: v22.2.0
- browser
- name/version: Arc
- [] typescript
- version:
- Is the bug related to documentation in
- README.md
- source code documentation
- SDK API docs on https://learn.microsoft.com
Describe the bug
Getting the following error: Failed to save file <file>. Error: Error: Failed to upload file to Azure: One of the HTTP headers specified in the request is not supported
To Reproduce
Steps to reproduce the behavior:
- Use NestJS
- Run the following code:
const blockBlobClient: BlockBlobClient = this.azureClient.getBlockBlobClient(store.key);
await blockBlobClient.uploadStream(readStream, undefined, undefined, {
blobHTTPHeaders: {
blobContentType: 'application/pdf',
blobContentLanguage: 'en-US',
blobContentEncoding: 'utf-8',
},
onProgress: (progress) => {
this.logger.debug(progress);
}
}).catch((error) => {
this.logger.error(`Error uploading to Azure Blob Storage: ${error.message}`);
throw new Error(`Failed to upload file to Azure: ${error.message}`);
});
this.logger.debug(`"${store.key}" uploaded to Azure Blob storage.`);
} else {
throw new Error("No client found");
}
Expected behavior
Expected the file to upload.
ScreenshotsN/A
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
This issue points to a problem in the data-plane of the library.Workflow: This issue is responsible by Azure service team.Storage Service (Queues, Blobs, Files)Issues that are reported by GitHub users external to the Azure organization.Workflow: This issue needs attention from Azure service team or SDK teamThe issue doesn't require a change to the product in order to be resolved. Most issues start as that