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.

[QUERY] Using BlobRequestOptions.SingleBlobUploadThresholdInBytes in Azure.Storage.Blobs

See original GitHub issue

Question We’ve been using the Microsoft.WindowsAzure.Storage.Blob version 9.3.2.0 and used a BlobRequestOptions to set the property SingleBlobUploadThresholdInBytes in our CloudBlobClient as follows:


public void SomeMethod()
{
     var container = GetContainer(connectionString, containerName, new BlobRequestOptions
      {
          SingleBlobUploadThresholdInBytes = 2 * 1024 * 1024
      });
}

private CloudBlobContainer GetContainer(string connectionString, string containerName, BlobRequestOptions blobRequestOptions)
{
            CloudStorageAccount storageAccount  = CloudStorageAccount.Parse(connectionString);
            CloudBlobClient client = storageAccount.CreateCloudBlobClient();
            client.DefaultRequestOptions = blobRequestOptions;
        
        //Do something more...        
 }

Now we are making the migration of the library Microsoft.WindowsAzure.Storage.Blob 9.3.2.0 to Azure.Storage.Blobs v12.8.0 and I can’t manage to find an equivalent to this configuration. How can I still do this now?

Environment:

  • .Net Version: Full Framework 4.8
  • Original version: Microsoft.WindowsAzure.Storage.Blob 9.3.2.0
  • New version: Azure.Storage.Blobs v12.8.0
  • IDE and version : Visual Studio 16.8.5

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
amnguyecommented, Mar 3, 2021

Hi @WillRock19 ,

Next time when you have a separate question could you open a new thread? that way we can get notified of your issue, Thanks.

If you’re looking to only grab the sasToken and not the SasUri, you can either do what you’re doing above which is

Uri sasUri = container.GenerateSasUri(permissions,expiryTime);
BlobUriBuilder uriBuilder= new BlobUriBuilder(sasUri);
string sasToken = uriBuilder.sas

or you can create the sas token from using the BlobSasBuilder

BlobSasBuilder sasBuilder = new BlobSasBuilder() {
....
};
string sasToken = sasBuilder.builder.ToSasQueryParameters(ClientConfiguration.SharedKeyCredential).ToString();
1reaction
Mohit-Chakrabortycommented, Feb 23, 2021

Thank you for your feedback. Tagging and routing to the team best able to assist.

Read more comments on GitHub >

github_iconTop Results From Across the Web

BlobRequestOptions.SingleBlobUploadThresholdInBytes ...
Gets or sets the maximum size of a blob in bytes that may be uploaded as a single blob. ... Storage.Blob. Assembly: Microsoft.Azure.Storage.Blob.dll....
Read more >
Query Blob Contents (REST API) - Azure Storage
The Query Blob Contents operation applies a simple Structured Query Language (SQL) statement on a blob's contents and returns only the queried ......
Read more >
Blob block limits - Microsoft Q&A
NET version 11 by using the SingleBlobUploadThresholdInBytes property of the BlobRequestOptions object. When a block blob upload is larger ...
Read more >
BlockBlobClient.Query(String, BlobQueryOptions ...
The Query(String, BlobQueryOptions, CancellationToken) API returns the result of a query against the blob. For more information, see Query Blob Contents.
Read more >
Query for a Blob Storage endpoint using the Azure ...
In this article, you learn how to query a Blob Storage endpoint using the Azure Storage management library. Then you use that endpoint...
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