Roo/data/Connection.js
[roojs1] / Roo / data / Connection.js
index a47f8a6..665805f 100644 (file)
@@ -333,5 +333,40 @@ Roo.extend(Roo.data.Connection, Roo.util.Observable, {
                 form.removeChild(hiddens[i]);
             }
         }
+    },
+    // this is a 'formdata version???'
+    
+    
+    doFormUploadNew : function(o, ps, url){
+         
+        var formData = new FormData(Roo.getDom(o.form));
+        
+         
+         var cb = {
+            success: this.handleResponse,
+            failure: this.handleFailure,
+            scope: this,
+            argument: {options: o},
+            timeout : o.timeout || this.timeout
+        };
+
+        var method =   "POST";
+
+         
+
+        if(typeof o.autoAbort == 'boolean'){ // options gets top priority
+            if(o.autoAbort){
+                this.abort();
+            }
+        }else if(this.autoAbort !== false){
+            this.abort();
+        }
+
+       
+        this.transId = Roo.lib.Ajax.request(method, url, cb, formData, o);
+         
     }
+    
 });