Roo/bootstrap/ButtonUploader.js
authorAlan Knowles <alan@roojs.com>
Wed, 2 Jun 2021 06:51:32 +0000 (14:51 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 2 Jun 2021 06:51:32 +0000 (14:51 +0800)
Roo/bootstrap/ButtonUploader.js

index c9111da..88bde1c 100644 (file)
@@ -129,38 +129,15 @@ Roo.extend(Roo.bootstrap.CardUploader, Roo.bootstrap.Button,  {
             return;
         }
         
-        Roo.each(this.selectorEl.dom.files, function(file){    
-            this.fireEvent('uploaded', this, [file]);
+        Roo.each(this.selectorEl.dom.files, function(file){
+            var url = this.urlAPI.createObjectURL(file); // not sure...
+            this.fireEvent('uploaded', this, [file, url]);
         }, this);
          
     },
     
-      
-    
-      
-    
-    addFile : function(file)
-    {
-           
-        if(typeof(file) === 'string'){
-            throw "Add file by name?"; // should not happen
-            return;
-        }
-        
-        if(!file || !this.urlAPI){
-            return;
-        }
-        
-        // file;
-        // file.type;
-        
-        var _this = this;
-        
-        
-        var url = _this.urlAPI.createObjectURL( file);
        
-        
-    },
+   
     
     /**
      * addCard - add an Attachment to the uploader