List Info

Thread: Re: File uploads with django - memory usage questions




Re: File uploads with django - memory usage questions
user name
2008-02-24 01:34:15
Read that patch, but considering that this has not been
merged, I
think are soem known issues with this patch. Reading it, I
cant figure
out, what the pros, cons are. Any help?
Suppose I do not apply this patch, the is there some way to
specify
that django not accept any file above a fixed size. Or
should this
setting be specified somewhere in apache config?

On Feb 24, 3:46 am, "alex.gay...gmail.com"
<alex.gay...gmail.com>
wrote:
> There is a ticket related to this:http://code
.djangoproject.com/ticket/2070
> there is a patch that based on the comments should
work.
>
> On Feb 23, 2:48 pm, shabda <shabda.r...gmail.com> wrote:
>
> > 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-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )