Roo/bootstrap/UploadCropbox.js
authoredward <edward@roojs.com>
Mon, 14 Mar 2016 03:36:45 +0000 (11:36 +0800)
committeredward <edward@roojs.com>
Mon, 14 Mar 2016 03:36:45 +0000 (11:36 +0800)
Roo/bootstrap/UploadCropbox.js

index 1dc5db1..6e74c8f 100644 (file)
@@ -1205,7 +1205,7 @@ Roo.extend(Roo.bootstrap.UploadCropbox, Roo.bootstrap.Component,  {
             return;
         }
         
-        file.xhr = this.xhr;
+        this.file.xhr = this.xhr;
 
         this.xhr.open(this.method, this.url, true);
         
@@ -1239,10 +1239,10 @@ Roo.extend(Roo.bootstrap.UploadCropbox, Roo.bootstrap.Component,  {
         formData.append('returnHTML', 'NO');
         
         if(crop){
-            formData.append('crop', crop);
+            formData.append('crop', _this.cropData);
         }
         
-        formData.append(this.paramName, file, file.name);
+        formData.append(this.paramName, this.file, this.file.name);
         
         if(this.fireEvent('prepare', this, formData) != false){
             this.xhr.send(formData);