7👍
✅
I faced a similar issue a while back instead of using set_contents_from_filename(f)
try k.set_contents_from_string(f.read())
I did the same thing in this project here: https://github.com/buddylindsey/developerrage/blob/master/developerrage/comic/views.py
Source:stackexchange.com