Permalink
Browse files

Merge pull request #239 from sedouard/fix_233

fix(adapters/blob) - blob adapter should parse strings to types
  • Loading branch information...
2 parents ce8b5e2 + 106ab43 commit f33b61ac6464f96d69c1c2de21fe9ca9010c2dfc Steven Edouard committed Jul 27, 2015
Showing with 3 additions and 3 deletions.
  1. +2 −2 app/adapters/blob.js
  2. +1 −1 app/controllers/blob.js
@@ -107,9 +107,9 @@ export default DS.Adapter.extend({
blobs.push({
id: result.entries[i].name,
name: result.entries[i].name,
- size: result.entries[i].properties['content-length'],
+ size: parseInt(result.entries[i].properties['content-length']),
type: result.entries[i].properties['content-type'],
- lastModified: result.entries[i].properties['last-modified'],
+ lastModified: new Date(Date.parse(result.entries[i].properties['last-modified'])),
container: snapshot.container,
container_id: snapshot.container_id
});
@@ -11,6 +11,6 @@ export default Ember.Controller.extend({
*/
prettySize: function () {
var size = this.get('model.size');
- return filesize(parseInt(size)).human('si');
+ return filesize(size).human('si');
}.property('model.size')
});

0 comments on commit f33b61a

Please sign in to comment.