Skip to content

Commit fdc11e8

Browse files
committed
Added mime type to Metadata
1 parent 5f8608f commit fdc11e8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

www/Entry.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ Entry.prototype.getMetadata = function(successCallback, errorCallback) {
6767
var success = successCallback && function(entryMetadata) {
6868
var metadata = new Metadata({
6969
size: entryMetadata.size,
70-
modificationTime: entryMetadata.lastModifiedDate
70+
modificationTime: entryMetadata.lastModifiedDate,
71+
type: entryMetadata.type
7172
});
7273
successCallback(metadata);
7374
};

www/Metadata.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ var Metadata = function(metadata) {
2828
if (typeof metadata == "object") {
2929
this.modificationTime = new Date(metadata.modificationTime);
3030
this.size = metadata.size || 0;
31+
this.type = metadata.type || '';
3132
} else if (typeof metadata == "undefined") {
3233
this.modificationTime = null;
3334
this.size = 0;
35+
this.type = null;
3436
} else {
3537
/* Backwards compatiblity with platforms that only return a timestamp */
3638
this.modificationTime = new Date(metadata);

0 commit comments

Comments
 (0)