4👍
You can monitor an upload in progress by writing your own Django upload handler. All you need to do is subclass django.core.files.uploadhandler.FileUploadHandler
and implement the receive_data_chunk
and file_complete
methods.
Django’s upload handler documentation gives you the details you need.
3👍
It depends on your server setup. If you use Apache with mod_python then files are streamed to your Django process as they arrive. But if you run Django behind a web server using wsgi or fastcgi, then the whole file will be buffered by the server before django gets involved. Then the solution given above wont work.
This is “by design” because tying up fastcgi processes waiting for file uploads would be a big waste. So what you have to do instead is use a server module such as http://redmine.lighttpd.net/wiki/1/Docs:ModUploadProgress for Lighttpd, which implements the upload_progress view for you on the server. Or http://wiki.nginx.org/NginxHttpUploadProgressModule for nginx.
- [Django]-How to include null results in Django ORM queries
- [Django]-Django models – conditionally set blank=True
- [Django]-Django: How to remove bullet point when printing form errors
- [Django]-Django 1.3 internationalization… switching language requires server restart?
1👍
Just found an upload progress module for apache:
http://github.com/drogus/apache-upload-progress-module
What I don’t know is how (or whether) it’s works with django & mod_wsgi.
- [Django]-Django cannot find my templatetags, even though it's in INSTALLED_APPS and has a __init__.py
- [Django]-Slow Celery Task Times