debugging File shim

This commit is contained in:
d98762625 2019-03-14 08:27:06 +00:00
parent 14d591caa1
commit d080c5dd14
7 changed files with 23 additions and 20 deletions

View file

@ -24,10 +24,16 @@ class File {
* @param {Object} stats (optional) - file stats e.g. lastModified
*/
constructor(data, name="", stats={}) {
this.data = Buffer.from(data);
// Look at File API definition to see how to handle this.
this.data = Buffer.from(data[0]);
this.name = name;
this.lastModified = stats.lastModified || Date.now();
this.type = stats.type || mime.getType(this.name);
console.log('File constructor');
console.log(typeof data);
console.log(data);
console.log(this.data);
}
/**