title: AJAX POST request not working in safari when sending file with FormData
body: <p>I have an API which uploads file on google cloud server and returns the url. I am using jquery ajax for API call. I am including file using FormData() object. It is working fine in chrome but when I am trying same in safari I get error which says cannot POST /my-own-site/link/index.html</p>
  
  <p>Here is my code</p>
  
  <pre><code>  &lt;form method = "post" enctype = "multipart/form-data" id = "get-cloud-link"&gt;
       &lt;input type="file" name = "filename" id = "image-input" accept=".jpg,.png,.jpeg"/&gt;
       &lt;input type="text" name = "tag" value = "iwh" class = "hidden"/&gt;
       &lt;input type="text" name = "empID" value = "" class = "hidden"/&gt;
       &lt;input class = "theme-btn" type="submit" id = "get-cloud-link-btn" value = "Upload"/&gt;
    &lt;/form&gt;
  
  
    $("form#get-cloud-link").submit(function(e){
  
         var imageInput = $("#image-input");
  
       if(imageInput.val() == '' || imageInput.val() == null){
         alert('No image is selected, please select image first');
        } else {
       var formData = new FormData($(this)[0]);
  
       for (var pair of formData.entries()) {
         console.log(pair[0]+ ', ' + pair[1]);
       }
  
        $.ajax({
           url : ' link-to-api/external/upload',
           type : "POST",
           cache : false,
           contentType : false,
           processData : false,
           headers : {
              "appID" : "",
              "version" : "",
              "empID" : ""
           },
           data : formData,
           beforeSend : function(){
           $(".image-uploading-wrapper").show();
           //xhr.setRequestHeader ("Authorization", "Basic " + btoa(username + ":" + password));
          },
           complete : function(){$(".image-uploading-wrapper").hide();},
           success : function(data){
  
           createUploadImage(data.imageUrl);
  
           imageInput.val("");
  
        },
           error : function(e){console.log(e)}
        });
      }
          e.preventDefault();
    });
  </code></pre>