Thanks for reply. I tried both variants before the post :) Nothing suited me and the customer.
When a-mailng files are uploaded to RAM anyway, zipping files just don't really help on binary data. I chosed to save them to a web- visible location. On Mar 18, 7:59 pm, Paulo Almeida <igcbioinformat...@gmail.com> wrote: > I can't help you with the technical part, but a couple of suggestions: > > * Sum the size of the images and send two (or more) e-mails if it exceeds a > threshold > * Forget attachments and just zip the images and make them accessible in an > URL that is e-mailed to the site admin > > - Paulo > > On Wed, Mar 17, 2010 at 8:57 AM, tezro <tezro...@gmail.com> wrote: > > Hello everyone. I need some help or advice. > > > I've got a form with 20 ImageFields - such a form for sending photos > > to the site admin as a request for a new user. Well, Django certainly > > handles and uploads the, that's OK. But when it comes to sending all > > the files as an attachment - I got stuck. > > > Here's a simple example of how I tried to do that: > > ------------------------------------------------ > > from django.core.mail import EmailMessage > > > email = EmailMessage() > > for (k, v) in request.FILES.items(): > > email.attach(v.name, v.read()) > > ------------------------------------------------ > > > Small files are read nicely. But when someone "clever" fills out all > > the form files (all the twenty) with images each one at least 10 Mb - > > Django consumes so much memory... so I'm not in knowledge to handle > > that. > > > Please, guide me how to handle big files from a form and send them > > without memory leaks. Thanks ahead. > > > -- > > 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<django-users%2bunsubscr...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/django-users?hl=en. > > -- 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.