Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content Type is not set on uploaded blobs #4586

Closed
XVincentX opened this issue Dec 14, 2023 · 0 comments · Fixed by #4587
Closed

Content Type is not set on uploaded blobs #4586

XVincentX opened this issue Dec 14, 2023 · 0 comments · Fixed by #4587
Assignees

Comments

@XVincentX
Copy link
Member

The azure-botbuilder-blobs package is not setting the content type header for what is being uploaded as part of the state - even thought we do know it's application/json.

I have authored a fix which I would suggest to apply to this library:

diff --git a/node_modules/botbuilder-azure-blobs/src/blobsStorage.ts b/node_modules/botbuilder-azure-blobs/src/blobsStorage.ts
index a2357f3..196e736 100644
--- a/node_modules/botbuilder-azure-blobs/src/blobsStorage.ts
+++ b/node_modules/botbuilder-azure-blobs/src/blobsStorage.ts
@@ -165,6 +165,7 @@ export class BlobsStorage implements Storage {
 
                 return blob.upload(serialized, serialized.length, {
                     conditions: typeof eTag === 'string' && eTag !== '*' ? { ifMatch: eTag } : {},
+                    blobHTTPHeaders: { blobContentType: 'application/json' }
                 });
             },
             {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants