title: Blob Stream as Input Binding in Azure Function uses which LocationMode to get input stream
body: <p>I am using Blob as input binding to get the blob stream as input and then doing processing on this stream text. For disaster recovery, I need to mention LocationMode (Microsoft.Azure.Storage.RetryPolicies) as "PrimaryThenSecondary" while function is getting input stream. What is the by default LocationMode in this case and how to change it.</p>
  
  <p>Below is how Blob input binding is being used-</p>
  
  <pre><code>[FunctionName("FunctionName")]
          public async Task RunAsync(
              [EventGridTrigger]EventGridEvent eventGridEvent,
              [Blob("{data.url}", FileAccess.Read, Connection = "BlobStorageConnectionString")]Stream input,
              [Table("TableName", Connection = "BlobStorageConnectionString")]CloudTable cloudTable,
              ILogger log)
          {
            //Some code
  
            //To get the data in blob
            StreamReader streamReader = new StreamReader(input);
            string blobData = await streamReader.ReadToEndAsync();
          }
  </code></pre>
  
  <p>One way I see of controlling this is - get the CloudBlockBlob instead of stream as input</p>
  
  <pre><code>[FunctionName("FunctionName")]
          public async Task RunAsync(
              [EventGridTrigger]EventGridEvent eventGridEvent,
              [Blob("{data.url}", FileAccess.Read, Connection = "BlobStorageConnectionString")]CloudBlockBlob input,
              [Table("TableName", Connection = "BlobStorageConnectionString")]CloudTable cloudTable,
              ILogger log)
          {
            //Some code to get the stream using 
            // Task DownloadToFileAsync(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext);
          }
  </code></pre>