Hi,

How can I return both an image file and some text fields with
HttpResponse?  It seems that the image file gets stripped under my
current method. Here is an excerpt:

        photofile = open(photo_filepath, "rb")

        data = {}
        data['msg1'] = 'testmsg'
        data['msg2'] = 'testmsg2'
        data['msg3'] = 'testmsg3'
        json = simplejson.dumps(data)

        myContent = {}
        myContent['json'] = json
        myContent['photofile'] = photofile

        return HttpResponse(content = myContent, mimetype='multipart/
form-data')

Thanks!

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

Reply via email to