     @settingsForm = new KDFormViewWithFields formOptions, @getData()
 
     avatarUploadView = @settingsForm.inputs["Avatar"]
-
     avatarUploadView.on 'FileReadComplete', ({file, progressEvent})->
+      log 'read'
       avatarUploadView.$('.kdfileuploadarea').css
         backgroundImage : "url(#{file.data})"
       avatarUploadView.$('span').addClass 'hidden'
 
-    avatarUploadView.on 'FileUploadComplete', (files)->
-      for {filename, resource} in files
-        console.log {filename, resource}
+    avatarUploadView.on 'FileUploadComplete', (res)=>
+      log 'upload',res
+      if res.length and res[0].resource
+        @customUrl = res[0].resource
+
+    # avatarUploadView.on 'FileUploadComplete', (files)->
+    #   for {filename, resource} in files
+    #     console.log {filename, resource}
 
 
 

      isNewGroup = yes
    isPrivateGroup = 'private' is group.privacy

    _updateGroupHandler =(group, formData)->
      group.modify formData, (err)->
        if err
          new KDNotificationView

      fields:
        "Avatar"              :
          label             : "Avatar"
          cssClass        : 'avatar'
          limit           : 1
          preview         : "thumbs"
          extensions      : null
          fileMaxSize     : 2048
          totalMaxSize    : 2048
          fieldName       : "thumbnails"
          convertToBlob   : yes
          title           : ""
          itemClass         : KDImageUploadView
          actions         : {
            big    :
              [
