Getting the URL of a redirect from an AJAX jQuery call
===

I'm trying to catch images in a URL field that aren't Imgur images, sideload them to imgur, then submit the sideloaded URL. I have the following code:

    var $form = $('#organize-image'),
        form = $form[0],
        image = form.image,
        submit = form["form-submit"];
    $form.on('submit', function(e) {
      var url = image.value;
      if (!check.imgur(url)) { // Checks if the URL is an image and from imgur.com
        e.preventDefault()
        e.stopPropagation();
        submit.disabled = true;
        submit.innerHTML = 'Re-hosting, hold on&hellip;';
        $.ajax({
          url: "http://api.imgur.com/2/upload",
          dataType: 'jsonp',
          data: "url=" + encodeURIComponent(url)
        }).done(function(data) {
          console.log('done');
        }).fail(function(data, textStatus, jqXHR) {
          console.log('fail');
        })
      }
    })

Right now, I'm just trying to figure out what's going on. On a successful upload, Imgur 302 redirects you to the image page. The good news is that when I do this, I see the AJAX call to the correct URL, and a request for the redirect.

The bad news is that if `dataType` is not set or not `jsonp`, the request for the redirect is cancelled by Chrome. I have no idea why. However, if I set `dataType` to `jsonp`, the redirect is followed by the AJAX call, but then I get a parse error since the data is actually html.

What am I supposed to do? All I need is the URL.