Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixed #19457 - ImageField size detection fails for some files even when PIL could succeed #586
@apollo13 pull request updated with new image now.
i also added check to except block to ensure that we are ignoring only "truncated stream" errors and reraise other exceptions from zlib.
also, i know that checking error code with str.startswith() is at least strange, but it looks like we have no other choice, because zlib does not save it anywhere else and return only formatted string with error description.
or i'm missing something?