|
@@ -19,12 +19,7 @@ class DishFile extends DishTranslationType {
|
|
|
static toByteArray() {
|
|
|
DishFile.checkForValue(this.value);
|
|
|
if (Utils.isNode()) {
|
|
|
- console.log('toByteArray original value:');
|
|
|
- console.log(this.value);
|
|
|
- // this.value = Utils.readFileSync(this.value);
|
|
|
- this.value = Array.prototype.slice.call(Utils.readFileSync(this.value));
|
|
|
- console.log('toByteArray value:');
|
|
|
- console.log(this.value);
|
|
|
+ this.value = Utils.readFileSync(this.value);
|
|
|
} else {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
Utils.readFile(this.value)
|
|
@@ -42,9 +37,7 @@ class DishFile extends DishTranslationType {
|
|
|
*/
|
|
|
static fromByteArray() {
|
|
|
DishFile.checkForValue(this.value);
|
|
|
- this.value = new File(this.value, "unknown");
|
|
|
- console.log('from Byte array');
|
|
|
- console.log(this.value);
|
|
|
+ this.value = new File(this.value, "file.txt");
|
|
|
}
|
|
|
}
|
|
|
|