Skip to content

fix: tmpfile not supported on web error when using base64 result #563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gorbypark
Copy link

I was pleasantly surprised this is working perfectly for my use case on the web, except for one small error thrown, even when the result option is set to base64. The release capture function (on web) was set to just throw an error, always.

Original:

function releaseCapture(uri) {
  throw new Error("Tmpfile is not implemented for web. Try base64 or file");
}

I added a quick little conditional to only throw the error if options.results type is tmpfile.

function releaseCapture(uri) {
  if (options.result === "tmpfile") {
    throw new Error("Tmpfile is not implemented for web. Try base64 or file");
  }
}

@gorbypark gorbypark changed the title Fix tmpfile not supported on web error when using base64 result Fix: tmpfile not supported on web error when using base64 result Feb 12, 2025
@gorbypark gorbypark changed the title Fix: tmpfile not supported on web error when using base64 result fix: tmpfile not supported on web error when using base64 result Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant