From: Alan Knowles Date: Wed, 2 Jun 2021 06:51:32 +0000 (+0800) Subject: Roo/bootstrap/ButtonUploader.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=ee213011d90f134e14a7017e9ab63b9ccb035ab4 Roo/bootstrap/ButtonUploader.js --- diff --git a/Roo/bootstrap/ButtonUploader.js b/Roo/bootstrap/ButtonUploader.js index c9111dad21..88bde1c8c9 100644 --- a/Roo/bootstrap/ButtonUploader.js +++ b/Roo/bootstrap/ButtonUploader.js @@ -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