Closed vincentsartoko closed 2 years ago
It returns length when available https://github.com/nodeca/probe-image-size/blob/master/http.js#L65. But that's not guaranteed.
This length attribute is based on content-length right? This is not related to probe-image-size, but do u know how to get the guaranteed size?
The only way to know size with guarantee - full download.
I need to download a file from a URL, and need to limit 2 things: dimension and size. probe-image-size will help on the dimension, but I can only check the content-length just after probe-image-size, ready to be downloaded (extra request), it would be nice to be able to check content-length as well as the dimension with a single request without triggering the download function...