| |
Django users |
> Is there a way to limit upload file size *before* the upload is > Say I want to give people the option of uploading movie files, but I Fortunately, you *can* control this at the Apache level. Look at the Regards,
> Hi.
> accepted?
> 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.
even if such a limit existed in Django, it still wouldn't help your
Apache process, since it is already accepting the data.
LimitRequestBody directive.
Malcolm