Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Limiting file size before upload?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Malcolm Tredinnick  
View profile  
 More options Jul 10 2006, 6:57 am
From: Malcolm Tredinnick <malc...@pointy-stick.com>
Date: Mon, 10 Jul 2006 20:57:54 +1000
Local: Mon, Jul 10 2006 6:57 am
Subject: Re: Limiting file size before upload?

On Mon, 2006-07-10 at 10:42 +0000, daniel.tie...@gmail.com wrote:
> Hi.

> Is there a way to limit upload file size *before* the upload is
> accepted?

> Say I want to give people the option of uploading movie files, but I
> want to limit them to 4MB per movie. If I understand the upload
> behaviour of Django correctly, the file is first accepted into main
> memory (*) , after which I have access to metadata.
> This would mean that somebody could easily OOM my Apache just by
> uploading a huuuuuge file. Also, in a hosted environment, this is
> unnecessary traffic which I'd have to pay for.

Without answering your question directly, let me just point out that
even if such a limit existed in Django, it still wouldn't help your
Apache process, since it is already accepting the data.

Fortunately, you *can* control this at the Apache level. Look at the
LimitRequestBody directive.

Regards,
Malcolm


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google