From 20640b54a142f16332a30c48c47d59fb91b9ba48 Mon Sep 17 00:00:00 2001 From: owent <> Date: Wed, 8 Nov 2023 10:50:36 +0800 Subject: [PATCH] Fix uploader --- lib/index.js | 2 +- lib/index.js.map | 2 +- src/index.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/index.js b/lib/index.js index 7419bf9..e335df6 100755 --- a/lib/index.js +++ b/lib/index.js @@ -39219,7 +39219,7 @@ async function run() { */ const find_mime = lite_1.default.getType(path.extname(file_path)); const file_length = fs.statSync(file_path).size; - const file_data = fs.createReadStream(file_path); /* await readableToString( + const file_data = fs.readFileSync(file_path); /* await readableToString( fs.createReadStream(file_path) );*/ const request_params = { diff --git a/lib/index.js.map b/lib/index.js.map index 7419bf9..e335df6 100755 --- a/lib/index.js.map +++ b/lib/index.js.map @@ -39219,7 +39219,7 @@ async function run() { */ const find_mime = lite_1.default.getType(path.extname(file_path)); const file_length = fs.statSync(file_path).size; - const file_data = fs.createReadStream(file_path); /* await readableToString( + const file_data = fs.readFileSync(file_path); /* await readableToString( fs.createReadStream(file_path) );*/ const request_params = { diff --git a/src/index.ts b/src/index.ts index 11a460c..49861ca 100644 --- a/src/index.ts +++ b/src/index.ts @@ -727,7 +727,7 @@ async function run() { const find_mime = mime.getType(path.extname(file_path)); const file_length = fs.statSync(file_path).size; - const file_data: any = fs.createReadStream( + const file_data: any = fs.readFileSync( file_path ); /* await readableToString( fs.createReadStream(file_path)