feedback-vos 1.0.37 → 1.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -749,8 +749,7 @@ async function uploadFileToRepo(token, owner, repo, file, folderPath, defaultBra
749
749
  }
750
750
  async function uploadScreenshotToRepo(token, owner, repo, screenshot, screenshotPath) {
751
751
  const compressedScreenshot = await compressScreenshot(screenshot, 1920, 0.7);
752
- const base64Data = compressedScreenshot.split(",")[1];
753
- const binaryData = Uint8Array.from(atob(base64Data), (c) => c.charCodeAt(0));
752
+ const base64Content = compressedScreenshot.includes(",") ? compressedScreenshot.split(",")[1] : compressedScreenshot;
754
753
  const repoResponse = await fetch(
755
754
  `https://api.github.com/repos/${owner}/${repo}`,
756
755
  {
@@ -771,7 +770,6 @@ async function uploadScreenshotToRepo(token, owner, repo, screenshot, screenshot
771
770
  const randomId = Math.random().toString(36).substring(2, 9);
772
771
  const filename = `feedback-${timestamp}-${randomId}.jpg`;
773
772
  const path = `${folderPath}/${filename}`;
774
- const base64Content = btoa(String.fromCharCode(...binaryData));
775
773
  const folderCheckUrl = `https://api.github.com/repos/${owner}/${repo}/contents/${folderPath}`;
776
774
  try {
777
775
  const folderCheck = await fetch(folderCheckUrl, {