I have a form which allows users to upload files.

The form is,
class AddFileForm(forms.Form):
    """Add a file."""
    filename = forms.FileField()

I am using S3 to store files, my view is something like,

    if request.method == 'POST':
        addfileform = bforms.AddFileForm(request.POST, request.FILES)
        if addfileform.is_valid():
            conn = S3.AWSAuthConnection(secrets.aws_id,
secrets.aws_key)
            filename = '/%s/%s' % (project,
addfileform.cleaned_data['filename'].filename)
            response = conn.put(bucket, filename,
addfileform.cleaned_data['filename'].content)

So my question is would using a call like
addfileform.cleaned_data['filename'].content in my view mean that if
an user uploads a 100 MB file, the server would have that data in
memory? What can I do to counter this?
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to