Hi,

I'm trying to save binary POST data to an ImageFile field - so far
with no satisfying success.

I can't seem to convince the client (Flex based image editor) to send
binary data as correct "multipart/form-data"; I only have the option
to send as raw binary data or with POST variables.

My view function happily receives the binary data, and it looks ok. As
far as I understand things, if the uploaded data was sent correctly as
multipart-form-data, Django would create an InMemoryUploadFile object
and pass it in request.FILES. I could use this code to save the image
then:

model_instance.image.save("%s.jpg" % img_id, request.FILES
['user_img'], True)

What sensible approach could I use to update/save the image with
binary POST data? I do not want to create a temporary file, though.

I just don't seem to have enough in-depth Django knowledge to find a
satisfying solution...

Thanks!

Markus

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to