title: Does a blob currently have a SAS url?
body: <p>I have a MVC 5 internet application, that uploads files to Azure blob storage. I have currently implemented the code to create a SAS for blobs in a container.</p>
  
  <p>I have a MVC view, that lists many images via the <code>&lt;img src&gt;</code> tag for many different objects. Each of these images are the same image. By that I mean they have the same fileName and are in the same container.</p>
  
  <p>Is it possible to check if a blob already has a current SAS url, and if so, retrieve that SAS url?</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here is my code to get a sas url:</p>
  
  <pre><code>public string GetBlobSasUri(string containerName, string fileName)
  {
      CloudBlobContainer container = GetCloudBlobContainer(containerName);
      //Get a reference to a blob within the container.
      CloudBlockBlob blob = container.GetBlockBlobReference(fileName);
  
      //Set the expiry time and permissions for the blob.
      //In this case the start time is specified as a few minutes in the past, to mitigate clock skew.
      //The shared access signature will be valid immediately.
      SharedAccessBlobPolicy sasConstraints = new SharedAccessBlobPolicy();
      sasConstraints.SharedAccessStartTime = DateTime.UtcNow.AddMinutes(-5);
      sasConstraints.SharedAccessExpiryTime = DateTime.UtcNow.AddHours(4);
      sasConstraints.Permissions = SharedAccessBlobPermissions.Read;
  
      //Generate the shared access signature on the blob, setting the constraints directly on the signature.
      string sasBlobToken = blob.GetSharedAccessSignature(sasConstraints);
  
      //Return the URI string for the container, including the SAS token.
      return blob.Uri + sasBlobToken;
  }
  </code></pre>
  
  <p>If I pass in a <code>containerName</code> with <code>"Test"</code> and a <code>FileName</code> with <code>"Example.png"</code>, an SAS is created and returned. If I then pass the same parameters into the function, can I check to see if the <code>FileName</code> already has a SAS created for it, and if so, return the same SAS url?</p>