roojs-bootstrap.js
[roojs1] / roojs-bootstrap-debug.js
index 2b384ff..1ee1a40 100644 (file)
@@ -12722,7 +12722,7 @@ Roo.extend(Roo.bootstrap.CardUploader, Roo.bootstrap.Input,  {
             }
             
         ];
-
+        
         var cn = this.addxtype(
             {
                  
@@ -12753,7 +12753,16 @@ Roo.extend(Roo.bootstrap.CardUploader, Roo.bootstrap.Input,  {
         // dont' really need ot update items.
         // this.items.push(cn);
         this.fileCollection.add(cn);
-        this.updateInput();
+        
+        var _t = this;
+        var reader = new FileReader();
+        reader.onloadend = function(evt) {  
+            data.srcdata =  evt.target.result;
+            _t.updateInput();
+        };
+        reader.readAsDataURL(data.src);
+        
+        
         
     },
     removeCard : function(id)