title: Node.js Azure OCR - use local file (blob)
body: <p>I'm using the Azure OCR Service to get the text of an image back ( <a href="https://docs.microsoft.com/de-de/azure/cognitive-services/Computer-vision/quickstarts/javascript#OCR" rel="nofollow noreferrer">https://docs.microsoft.com/de-de/azure/cognitive-services/Computer-vision/quickstarts/javascript#OCR</a>).</p>
  
  <p>So far everything is up and running, but now I would like to use a local file instead of an already uploaded one. </p>
  
  <pre><code>// Display the image.
          var sourceImageUrl = document.getElementById("inputImage").value;
          document.querySelector("#sourceImage").src = sourceImageUrl;
  
          // Perform the REST API call.
          $.ajax({
              url: uriBase + "?" + $.param(params),
  
              // Request headers.
              beforeSend: function(jqXHR){
                  jqXHR.setRequestHeader("Content-Type","application/json");
                  jqXHR.setRequestHeader("Ocp-Apim-Subscription-Key", subscriptionKey);
              },
  
              type: "POST",
  
              // Request body.
              data: '{"url": ' + '"' + sourceImageUrl + '"}',
          })
  
          .done(function(data) {
              // Show formatted JSON on webpage.
              $("#responseTextArea").val(JSON.stringify(data, null, 2));
          })
  </code></pre>
  
  <p>I tried </p>