       @validators = @settings.validators = []
       @currentObject = null
 
+      @__onOpenDialog = $.Callbacks()
       @__onUploadComplete = $.Callbacks()
       @__onChange = $.Callbacks().add (object) =>
         object?.promise().done (info) =>

        ])
        @__api.onChange = utils.publicCallbacks(@__onChange)
        @__api.onUploadComplete = utils.publicCallbacks(@__onUploadComplete)
        @__api.inputElement = @element.get(0)
      @__api

        utils.fileSelectDialog @template.content, @settings, (input) =>
          @__handleDirectSelection('object', input.files)
      else
        dialogApi = uploadcare.openDialog(@currentObject, tab, @settings)
        @__onOpenDialog.fire(dialogApi)
        dialogApi.done(@__setObject)

    api: ->
      if not @__api
