title: Azure Rest API PUT Block Blob Returns "The specified resource does not exist." CORS
body: <p>I am trying to upload a file to Azure Blob storage.
  For some reason when I try to put a new block blob on in the storage it tells me the resource does not exist. I am sure it is something silly I am missing.</p>
  
  <p>According to the documentation: </p>
  
  <p>The Put Blob operation creates a new block blob or page blob, or updates the content of an existing block blob.
  Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a block blob, use the Put Block List (REST API) operation.</p>
  
  <p>CORS is setup and that seems okay.</p>
  
  <p>When I do a preflight and get this:</p>
  
  <pre><code>Request URL:https://&lt;account&gt;.blob.core.windows.net/test/image.png
  Request Method:OPTIONS
  Status Code:200 OK
  
  Request Headers
  -----------------
  OPTIONS /test/image.png HTTP/1.1
  Host: &lt;account&gt;.blob.core.windows.net
  Connection: keep-alive
  Cache-Control: no-cache
  Pragma: no-cache
  Access-Control-Request-Method: PUT
  Origin: http://www.&lt;site&gt;.com
  User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36
  Access-Control-Request-Headers: accept, content-type
  Accept: */*
  Referer: http://www.&lt;site&gt;.com/azure/
  Accept-Encoding: gzip,deflate,sdch
  Accept-Language: en-US,en;q=0.8
  
  Response Headers
  ----------------
  HTTP/1.1 200 OK
  Transfer-Encoding: chunked
  Server: Blob Service Version 1.0 Microsoft-HTTPAPI/2.0
  x-ms-request-id: 0d372e95-1524-460a-ab9c-7973d42a7070
  Access-Control-Allow-Origin: http://www.&lt;site&gt;.com
  Access-Control-Allow-Methods: PUT
  Access-Control-Allow-Headers: accept, content-type
  Access-Control-Max-Age: 36000
  Access-Control-Allow-Credentials: true
  Date: Thu, 27 Feb 2014 22:43:52 GMT
  </code></pre>
  
  <p>But when I make the PUT request these are the results.</p>
  
  <pre><code>Request URL:https://&lt;account&gt;.blob.core.windows.net/test/image.png
  Request Method:PUT
  Status Code:404 The specified resource does not exist.
  
  Request Headers
  -----------------
  PUT /test/image.png HTTP/1.1
  Host: &lt;account&gt;.blob.core.windows.net
  Connection: keep-alive
  Content-Length: 22787
  Cache-Control: no-cache
  Pragma: no-cache
  x-ms-blob-content-disposition: attachment; filename = "image.png"
  User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36
  Content-Type: image/png
  x-ms-blob-type: BlockBlob
  Accept: application/json, text/plain, */*
  x-ms-version: 2013-08-15
  Origin: http://www.&lt;site&gt;.com
  x-ms-date: Thu, 27 Feb 2014 23:19:19 GMT
  Referer: http://www.&lt;site&gt;.com/azure/
  Accept-Encoding: gzip,deflate,sdch
  Accept-Language: en-US,en;q=0.8
  
  Response Headers
  ----------------
  HTTP/1.1 404 The specified resource does not exist.
  Content-Length: 223
  Content-Type: application/xml
  Server: Blob Service Version 1.0 Microsoft-HTTPAPI/2.0
  x-ms-request-id: d5a60c8b-356a-44ff-93af-0ea720b5591f
  x-ms-version: 2013-08-15
  Access-Control-Expose-Headers: x-ms-request-id,Server
  Access-Control-Allow-Origin: http://www.&lt;site&gt;.com
  Access-Control-Allow-Credentials: true
  Date: Thu, 27 Feb 2014 23:22:42 GMT
  </code></pre>