     @set 'isUploading', true
 
     @sign file
-      .then (data) ->
+      .then (json) ->
         settings =
-          url: "#{data.json.base_url}?#{serialize data.json.query_params}"
+          url: "#{json.base_url}?#{serialize json.query_params}"
           type: "PUT"
-          data: data.result
+          data: "bloop"
           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]
+            for p of json.headers
+              if json.headers.hasOwnProperty p
+                xhr.setRequestHeader p, json.headers[p]
         Ember.$.ajax settings
           .then (respData) ->
             Notify.info "Your file finished uploading. Please wait while we process your file."


  url: null

  read: (file) ->
    new Ember.RSVP.Promise (resolve, reject)->
      reader = new FileReader

      reader.onload = (e) ->
        data = {}
        data.content_type = file.type
        resolve
          result: e.target.result
          data:data

      reader.onerror = ->
        Notify.error "Error occured while trying to read the file"
        reject reject.error
      reader.readAsBinaryString file

  sign: (file) ->
    self = @
    new Ember.RSVP.Promise (resolve, reject) ->

      success = (data) ->
        settings =
          url: self.get 'url'
          type: 'GET'
          contentType: 'json'
          data: data.data

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

      self.read file
        .then success

  upload: (file) ->
    self = @

            respData
          , (respData)->
            Notify.error "Some Error occured while uploading the file"

      , ->
        debugger
`export default GCSUploader;`
