Here's some snippets from my code that work. I had to remove a lot that is specific to my organization, so no guarantees...
---------------------from xmitzipfile.py---------------------------------------------------------- def processZipfileBuffer(user, buffer): email = create_mail_object() if True: results = [] zs = ZipString(buffer) for name in zs.namelist(): xml = zs.read(name) status = process_xml_file(name, xml) results.append( status ) count = len(zs.namelist()) text = '%s uploaded %s files on %s\n' % (str(user), count, datetime.datetime.now()) text += '\n'.join(results) else: text="Email failed: %s" % sys.exc_value email.body = text email.send() return text def execute(user='unknown', filedata=None): if filedata==None: raise Exception('No Filedata to Upload') buffer = '' for chunk in filedata.chunks(): buffer += chunk #print 'xmitzipfile.execute buffer size ', len(buffer) print processZipfileBuffer(user, buffer) -----------------------from uploaders.__init__.py---------------------------------- import xmitzipfile def upload(option, **kwargs): return xmitzipfile.execute(**kwargs) ----------------------------from views.py def upload(request, *args, **kwargs): user = request.session.get('user', None) filedata = request.FILES['Filedata'] action = str(args[0]) results = uploaders.upload(action, user=user, filedata=filedata) return HttpResponse('OK') -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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.