5👍
✅
request.FILES
elements are file-likes in a wrapper. Stick the file data in a StringIO
, pass it to the django.core.files.File
constructor, then pass that to save()
.
Source:stackexchange.com