termai commited on
Commit
0b921e7
·
verified ·
1 Parent(s): 17a1fa8

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +2 -2
index.js CHANGED
@@ -18,7 +18,8 @@ const uploadFile = async (file) => {
18
  headers: formData.getHeaders(),
19
  maxBodyLength: Infinity,
20
  });
21
-
 
22
  return response.data || {};
23
  } catch (error) {
24
  console.error('Error uploading file', error.response?.data || error.message);
@@ -31,7 +32,6 @@ const patchScreenshot = (page, images) => {
31
  page.screenshot = async function (options = {}) {
32
  const buffer = await orig.apply(this, [options]);
33
  const url = await uploadFile(buffer);
34
- console.log("[patchScreenshot] Upload result:", url);
35
  if (url && url.path) {
36
  images.push(url.path);
37
  }
 
18
  headers: formData.getHeaders(),
19
  maxBodyLength: Infinity,
20
  });
21
+ console.log("[patchScreenshot] Upload result:", response.data);
22
+
23
  return response.data || {};
24
  } catch (error) {
25
  console.error('Error uploading file', error.response?.data || error.message);
 
32
  page.screenshot = async function (options = {}) {
33
  const buffer = await orig.apply(this, [options]);
34
  const url = await uploadFile(buffer);
 
35
  if (url && url.path) {
36
  images.push(url.path);
37
  }