Closed pickfire closed 2 years ago
Thank you for reporting the issue. Do you think that you can be able to prepare a PR with a fix for that?
I've just been trying to use this fix and it looks like the change makes the storage callable - not the cachefile_storage. Or have I misunderstood something here?
Yeah, looks like it, I noticed it in our project too but I didn't submit a pull request, supposedly it should also check if cachefile_storage
is callable.
But imagekit only accepts a storage object. It should supports a callable which returns a storage object for feature parity with django.
So rather than doing
cachefile_storage=S3Boto3Storage()
, one can just docachefile_storage=S3Boto3Storage
.https://github.com/matthewwithanm/django-imagekit/blob/f6ed35f060c30924a4c91ecd833847ceaec346cc/imagekit/cachefiles/__init__.py#L43-L45