Skip to content
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

Immediately exit if error is returned #14

Open
robpc opened this issue Apr 18, 2019 · 0 comments
Open

Immediately exit if error is returned #14

robpc opened this issue Apr 18, 2019 · 0 comments

Comments

@robpc
Copy link
Contributor

robpc commented Apr 18, 2019

Immediately exit if error is returned instead of waiting for the whole file to download. The most obvious case is when the url is an unsupported format (such as am .mp4). The lookup function in imageSize will always throw a type error, but request-image-size will download the whole file and check each chunk. This might be not noticeable in cases where the file is small but can be a pain when the file is larger, like the movie example.

I created PR #13 to resolve this issue with this change

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

No branches or pull requests

1 participant