             respData
           , (respData)->
             Notify.error "Some Error occured while uploading the file"
+
       , ->
-        Notify.error "Some Error occured while signing the URL"
-
+        debugger
 `export default GCSUploader;`

    @set 'isUploading', true

    @sign file
      .then (data) ->
        settings =
          url: "#{data.json.base_url}?#{serialize data.json.query_params}"
          type: "PUT"
          data: data.result
          contentType: false
          processData: false
          xhrFields:
            withCredentials: false
          beforeSend: (xhr)->
            for p of data.json.headers
              if data.json.headers.hasOwnProperty p
                xhr.setRequestHeader p, data.json.headers[p]
        Ember.$.ajax settings
          .then (respData) ->
            Notify.info "Your file finished uploading. Please wait while we process your file."


  url: null

  sign: (file) ->
    self = @
    new Ember.RSVP.Promise (resolve, reject) ->
      settings =
        url: self.get 'url'
        type: 'GET'
        contentType: 'json'
        data:
          content_type: file.type

      self._ajax settings
        .then (json)->
          resolve json
        , ->
          Notify.error "Server failed to return Signed URL"
          reject()


  upload: (file) ->
    self = @
