title: AngularJS Sends OPTIONS request instead of POST
body: <p>I'm trying to upload a picture to my S3 bucket. I'm using AngularJS v1.2.13. 
  When I use the simple case as displayed in their docs (submit form with <code>action</code> tag) everything works fine. However, if I want to do it the Angular way with <code>ng-click</code> Angular sends an <code>OPTIONS</code> request instead of a <code>POST</code> request.</p>
  
  <p>The following is the Service code, it first goes to the server to get a signature (I know that part is fine) then tries to POST with everything.</p>
  
  <pre><code>myServices.factory('s3', function($http) {
      var service = {};
  
      service.upload = function(fileName) {
  
          return $http(
              {
                  method:"POST",
                  url: "sign",
                  data: { "fileName": fileName }
              }
          ).then(
              function(result) {
                  // success
                  //resolve the promise as the data
                  var data = result.data;
                  var url = "https://" + data.bucket + ".s3.amazonaws.com/";
  
                  return $http.post(url, {
                      "key": data.key,
                      "AWSAccessKeyId": data.awsKey,
                      "acl": data.acl,
                      "policy": data.policy,
                      "signature": data.signature,
                      "Content-Type": "image/jpeg",
                      "success_action_redirect": "http://localhost:3000/s3Uploaded"
              }).then(
              function(response) {
                  // success
                  console.log("s3.upload, success: ");
                  console.log(response);
              },
              function(response) { 
                  // failed
                  console.log("s3.Upload, fail: ");
                  console.log(response);
              }
          );
  
      },
          function(response) { 
              // failed
              console.log("s3.sign, fail: ");
              console.log(response);
          }
      );
  };
  
  return service;
  });
  </code></pre>
  
  <p>What am I doing wrong?</p>