Open pankus opened 10 months ago
Seems like this was fixed on the master branch (currently version 1.6.1), https://github.com/flask-admin/flask-admin/blob/14e24c970f0ee3a29add830612eee9a0b0ba5dcc/flask_admin/form/upload.py#L464
And here is the commit https://github.com/flask-admin/flask-admin/commit/96b92deef8b087e86a9dc3e84381d254ea5c0342
I tested uploading a file, and didn't receive any errors.
Seems like this was fixed on the master branch (currently version 1.6.1),
Maybe I'm wrong but I can see the commit and this is from August 9, 2023:
And the version was released June 19:
So the fix was added two months later?
And another thing, I can see 1.6.1 being on a different date on pypi, February 20 (Which matches the tag build):
I just downloaded the source code that is attached to the release here on GH for 1.6.1 and still can see ANTIALIAS:
And I have got the error despite reinstalling the library a few times:
https://github.com/flask-admin/flask-admin/blob/896fca64f7eb7970bb5775c2c9ff6b3a07c9de4a/flask_admin/form/upload.py#L467C21-L467C21
ANTIALIAS was removed in Pillow 10.0.0 (after being deprecated through many previous versions). Now you need to use PIL.Image.LANCZOS or PIL.Image.Resampling.LANCZOS. https://stackoverflow.com/a/76616129/5541592
Line 467 must be corrected. Even better, I presume, if a user can manage the compression type using some user-defined parameter.