Roo/bootstrap/CardUploader.js
authorAlan Knowles <alan@roojs.com>
Fri, 20 Nov 2020 07:43:22 +0000 (15:43 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 20 Nov 2020 07:43:22 +0000 (15:43 +0800)
Roo/bootstrap/CardUploader.js

index e9080ce..0978a3b 100644 (file)
@@ -207,8 +207,8 @@ Roo.extend(Roo.bootstrap.CardUploader, Roo.bootstrap.Button,  {
                 xns : Roo.bootstrap,
                 xtype : 'Card',
                 closeable : true,
-                header : !data.mimetype.match(/image/) ? "Document": false,
-                header_image : data.mimetype.match(/image/) ? data.src  : false,
+                header : !data.mimetype.match(/image/) && !data.preview ? "Document": false,
+                header_image : data.mimetype.match(/image/) ? data.src  : data.preview,
                 data : data,
                 html : false,
                 listeners : {