django - How pyamf.amf3.ByteArray save to ImageField? -
I am getting the object 'pyamf.amf3.ByteArray' How can I save it in ImageField?
obj - an object in the project, data - array which Meets
data ['last image'] - includes a pyamf.amf3.ByteArray and image obj.image - an image field
new_name - The name for image (without path)
from django.core.files.base import content file obj.image.save (new_name, contentfile (data ['last image' ] Read ()) obj .ave ()
Comments
Post a Comment