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

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -