1👍
✅
instance.css_file
is a FieldFile
object, not a filename. You should use the name instead:
def form_valid(self, form):
instance = self.object
filename = instance.css_file.name
...
instance.css_file.save(filename, filedata)
super(CSSUpdate, self).save(form)
👤knbk
Source:stackexchange.com