After some digging, I finally worked it out. In case anyone is
interested, here is the code for Django:
from django.core.files.uploadedfile import SimpleUploadedFile
def set_user_image(request, img_id):
"""
set/update a user's image
"""
if not request.user.is_authenticated():
return
As I know Django can not save binary data with it's default orm, you can try
to select another orm like sqlalchemy, or you can try to
modify the orm to make it can save binary data.
2009/12/21 Markus T.
> Hi,
>
> I'm trying to save binary POST data to an ImageFile
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
3 matches
Mail list logo