Opened 16 years ago
Last modified 14 years ago
#9232 closed
problems with streaming files uplod with Django 1.0 — at Initial Version
Reported by: | Faheem Mitha | Owned by: | nobody |
---|---|---|---|
Component: | File uploads/storage | Version: | 1.0 |
Severity: | Keywords: | streaming file upload | |
Cc: | faheem@… | Triage Stage: | Design decision needed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hi,
I just upgraded to Django 1.0, and I've just finished fixing all my
unit tests. However, streaming file uploads are still broken. The
behaviour I'm seeing is as follows:
When I start the upload of the file, a file which looks like
eg. /tmp/tmpGjWpee.upload appears almost immediately, but does not
change in size thereafter. The size is either empty or 16M - 16M most
of the time. I haven't seen any other values appear. The file upload
completes some of the time, regardless, but is very slow. For very
large files, like 1g, it took so long I stopped it.
I've seen this behavior on two independent installations of 1.0, with
the same project/application. I have a different installation with a
pre-1.0 snapshot with a patch from #2070 applied, and that works fine
with an earlier version of the same model/application, with the
temporary file in /tmp appearing and growing in size as the upload
progresses, as expected.
I've created a small test project which shows the behavior, which I
attach. This was used on Debian with a source installation of Django
1.0, and Apache 2 with the mod_wsgi module.
The apache config appears
below. This is on Debian etch, with the following installed.
faheem@wsgi:/var/django/testproj/testapp$ dpkg -l | grep apache
ii apache2 2.2.3-4+etch5 Next generation, scalable, extendable web se
ii apache2-mpm-prefork 2.2.3-4+etch5 Traditional model for Apache HTTPD 2.1
ii apache2-utils 2.2.3-4+etch5 utility programs for webservers
ii apache2.2-common 2.2.3-4+etch5 Next generation, scalable, extendable web se
ii libapache2-mod-python 3.2.10-4 Apache 2 module that embeds Python within th
ii libapache2-mod-wsgi 2.0-1~bpo40+1 Python WSGI adapter module for Apache
Sincerely, Faheem Mitha.
*
# Testproj config.
Alias /media_testproj/ /var/django/media_testproj/
<Directory /var/django/media_testproj>
Order deny,allow
Allow from all
</Directory>
WSGIScriptAlias /testproj /var/django/testproj/apache/django.wsgi
<Directory /var/django/testproj/apache>
Order deny,allow
Allow from all
</Directory>
tarball of test project to reproduce problem