Fix file size display
This commit is contained in:
parent
03451d8c7d
commit
6a92fdc5e6
|
@ -17,7 +17,6 @@ limitations under the License.
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var React = require('react');
|
var React = require('react');
|
||||||
var filesize = require('filesize');
|
|
||||||
|
|
||||||
var MFileTileController = require("../../../../src/controllers/molecules/MFileTile");
|
var MFileTileController = require("../../../../src/controllers/molecules/MFileTile");
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@ limitations under the License.
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
var filesize = require('filesize');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
presentableTextForFile: function(content) {
|
presentableTextForFile: function(content) {
|
||||||
var linkText = 'Attachment';
|
var linkText = 'Attachment';
|
||||||
|
@ -28,7 +30,7 @@ module.exports = {
|
||||||
if (content.info.mimetype && content.info.mimetype.length > 0) {
|
if (content.info.mimetype && content.info.mimetype.length > 0) {
|
||||||
additionals.push(content.info.mimetype);
|
additionals.push(content.info.mimetype);
|
||||||
}
|
}
|
||||||
if (content.info.size && content.info.size.length > 0) {
|
if (content.info.size) {
|
||||||
additionals.push(filesize(content.info.size));
|
additionals.push(filesize(content.info.size));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue