       @dialogApi.fileColl.onAdd.add(@__setFile)
 
       @widget = null
+      @__state = null
 
     __setFile: (@file) =>
       ifCur = (fn) =>

              img = @element('image').attr('src', src)[0]
              @initImage([img.width, img.height])
          .always =>
            URL.revokeObjectURL(src)

      @__setState('unknown', {})
      @file.progress ifCur (info) =>

    # image
    # regular
    __setState: (state, data) ->
      @__state = state
      @container.empty().append(tpl("tab-preview-#{state}", data))

      if state is 'unknown' and @settings.crop
