Closed HenryMehta closed 2 years ago
You are not alone, i'm hitting the same issue have you find a solutions ?
Regars
I did find the solution but cannot remember what it was. I'm running it on a Ubuntu PC and there was something I didn't have downloaded. Once done it worked fine. It was some webp program needed for Linux. I just don't remember what - sorry
I have analized with more details the problem.
if you have the implementation reported in documentations is impossible it is worling with s3.
sender.storage.path
is not defined in s3 implementations, the it will return NotImplementedError
rewrite store_as_webp
as:
def store_as_webp(sender, **kwargs):
s3_image_path = '.'.join([sender.name, 'webp'])
_, fname = tempfile.mkstemp(dir="/tmp/")
sender.image.save(fname, 'webp')
f = open(fname, "rb")
sender.storage.save(s3_image_path, f)
f.close()
os.unlink(fname)
This is really just a question but I've implemented the WebP workaround proposed but it doesn't seem to work for me and I cannot understand what I've done wrong.
In my
apps.py
I haveThe first 2 logger lines are printed, then nothing so something is going wrong but I do not understand what. Any help would be appreciated