question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

blobContentDisposition is not returned when retrieving from blob storage

See original GitHub issue
  • Package Name: @azure/storage-blob
  • Package Version: 12.3.0
  • Operating system: Ubuntu 16.10
  • nodejs
    • version: v10.17.0
  • browser
    • name/version:
  • typescript
    • version:
  • Is the bug related to documentation in

Describe the bug When uploading to blob storage blobContentDisposition is set too attachment and it is confirmed as attachment when checking properties in storage explorer.

image But when retrieving the blob the header is not returned. image

I set the headers like this:

await blockBlobClient.upload(fileBuffer, length, {
            blobHTTPHeaders: {
                blobContentType: contentType,
                blobContentDisposition: 'attachment',
            },
        });

But I guess that doesn’t mather since it is confirmed to be added to the blob when checking storage explorer. I’ve tried different type of files with the same result.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ljian3377commented, Nov 12, 2020

I see. The upload using our SDK worked as expected. And when you get the blob without specifying the x-ms-version header in the request, it will use the default. You can set a default version for the Blob service using the Set Blob Service Properties operation. To do this with our SDK, via

    await blobServiceClient.setProperties({defaultServiceVersion: "2020-02-10"});
0reactions
EmmEmcommented, Nov 12, 2020

@ljian3377 I was using curl to retrieve the headers. curl -I <url>

I setup the storage in azure portal. And have been using @azure/storage-blob@12.3.0 and 12.1.1 to upload the files. Apparently it defaulted to 2009-09-19 when I setup the store. The store was created “2020-10-27 10:22:48 fm”

Read more comments on GitHub >

github_iconTop Results From Across the Web

blobContentDisposition ignored when uploading a file to blob ...
When uploading files to the Azure blob storage using uploadStream, the http header for blobContentDisposition is being ignored. Look at the ...
Read more >
Set Blob Properties (REST API) - Azure Storage
Subsequent calls to Get Blob Properties will not return this property, unless it is explicitly set on the blob again. x-ms-blob-content-type ...
Read more >
How to modify blob storage response header - Stack Overflow
Just it's an optional Request Header so it's not listed in the link you pasted. So if you want to set the Content-Disposition...
Read more >
Azure Storage SDK for Go (Preview) - Go Packages
CreateIfNotExists creates a blob container if it does not exist. Returns true if container is newly created or false if container already exists....
Read more >
Microsoft Azure Blob Storage operation
Get — Read blobs (the only available objects) by passing the name of the blob as an ID and returning the contents of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found