         @iframe = null
         @iframeForm = null
 
+      __fail: -> @__onError()
+
       __onError: => $(this).trigger('uploadcare.api.uploader.error')
       __onStart: => $(this).trigger('uploadcare.api.uploader.start')
       __onLoad: => $(this).trigger('uploadcare.api.uploader.load')

        @xhr.addEventListener 'error timeout abort', @__onError
        @xhr.addEventListener 'loadstart', @__onStart
        @xhr.addEventListener 'load', @__onLoad
        @xhr.addEventListener 'loadend', => @__onError() unless @xhr.status
        @xhr.upload.addEventListener 'progress', @__onProgress
        @xhr.send formData


        @fileSize = file.size
        @fileName = file.name

        if @fileSize > (100*1024*1024)
          @__fail()
          return

        formData = new FormData()
        formData.append('UPLOADCARE_PUB_KEY', @settings.publicKey)
        formData.append('UPLOADCARE_FILE_ID', @fileId)
