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

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -