Skip to content

Commit

Permalink
File: lastModifiedDate seems to deprecated now
Browse files Browse the repository at this point in the history
  • Loading branch information
Davit Barbakadze committed Feb 19, 2018
1 parent 404a61d commit 1fcd3a8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/javascript/file/File.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ define('moxie/file/File', [
} else if (this.type) {
var prefix = this.type.split('/')[0];
name = Basic.guid((prefix !== '' ? prefix : 'file') + '_');

if (Mime.extensions[this.type]) {
name += '.' + Mime.extensions[this.type][0]; // append proper extension if possible
}
}


Basic.extend(this, {
/**
File name
Expand All @@ -64,15 +64,15 @@ define('moxie/file/File', [
@default ''
*/
relativePath: '',

/**
Date of last modification
@property lastModifiedDate
@type {String}
@default now
*/
lastModifiedDate: file.lastModifiedDate || (new Date()).toLocaleString() // Thu Aug 23 2012 19:40:00 GMT+0400 (GET)
lastModifiedDate: file.lastModified ? new Date(file.lastModified) : file.lastModifiedDate || (new Date()).toLocaleString() // Thu Aug 23 2012 19:40:00 GMT+0400 (GET)
});
}

Expand Down

0 comments on commit 1fcd3a8

Please sign in to comment.