Django upload failing on request data read error

我与影子孤独终老i 提交于 2019-12-04 11:44:07

The problem could be:

  • your internet connection (some firewall blocking large uploads, just try uploading to some other service to test that).
  • your webbrowser (try disabling flash to see if that works)
  • your webserver (perhaps your webserver prohibits large uploads?)

So... to be a bit more helpful you'll have to give us some info about which part is the problem (should be fairly easy to test) and if it's the webserver (which I'm guessing) what kind of webserver you're running, what kind of Python handler (mod_wsgi, mod_python, fastcgi, etc..)

This is common with MediaTemple -- I encountered this problem, fixed it, and somehow it's broken again. It has to deal with something about NFS locking, and the system calls used by django's storage modules.

... (10 minutes later) ...

Found it:

Anyone trying to run the latest 1.1 svn release will have noticed that the above fix no longer works since TemporaryFileUploaderHandler now uses the locking code also. A workaround until mediatemple and/or django devs figure this out is to edit django.core.files.locks and change the two calls to fcntl.lockf to fcntl.flock

Here's a relevant bug report for anyone who's interested: http://code.djangoproject.com/ticket/9400

http://osdir.com/ml/DjangoUsers/2009-06/msg01014.html -> https://forums.mediatemple.net/viewtopic.php?id=2514

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!