We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e7bc858 commit 85adbe7Copy full SHA for 85adbe7
visual-js/visual/src/api.ts
@@ -1,4 +1,4 @@
1
-import fs from 'fs/promises';
+import fs from 'fs';
2
import fetch from 'node-fetch';
3
import crypto from 'crypto';
4
import { ProxyAgent } from 'proxy-agent';
@@ -158,9 +158,7 @@ const uploadToUrl = async ({
158
file: DataContent | DataPath;
159
compress?: boolean;
160
}) => {
161
- const uploadBody = isDataPath(file)
162
- ? await fs.readFile(file.path)
163
- : file.data;
+ const uploadBody = isDataPath(file) ? fs.readFileSync(file.path) : file.data;
164
165
const hash = crypto.createHash('md5').update(uploadBody).digest('base64');
166
0 commit comments