mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 07:16:17 -04:00
debugging File shim
This commit is contained in:
parent
14d591caa1
commit
d080c5dd14
7 changed files with 23 additions and 20 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue