The file is available as raw data in the request. How am I supposed to transform it to be saved on the disk represented by the ImageField
inside a model
.
Tried stuff:
file_ = File(request)
modelinstance.picture.save(filename, file_, save=False)
modelinstance.save()
and some variants of the above. An example on how to do this inside the django view would help.
Thanks!