如何上传Django中的电影文件? [英] How to upload a movie file in Django?

查看:162
本文介绍了如何上传Django中的电影文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很抱歉如果这个问题已经发布在某个地方。



我对Django很新。我一直在搜索很长时间的示例代码使用Django上传大文件,但是徒劳无功。



任何人都可以帮我一些示例代码来上传Django中的大文件或提供相关的可靠链接?



提前感谢

解决方案

Django本身处理大文件上传相当不错(整个文件没有加载到内存,因为1.0,请参阅 http://code.djangoproject.com/ticket/2070 )。



但是,django通常位于Web服务器后面,并且通常对请求体有限制。因此,Web服务器配置应该可能被调整(如果您使用apache,请查看 http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestbody )。


I am sorry if this question is already posted somewhere.

I am very new to Django. I have been googling around for quite a long time for sample codes to upload large files using Django, but goes in vain.

Can anyone help me with some sample code for uploading large files in Django or provide relavant reliable link(s)?

Thanks in advance.

解决方案

Django itself handles large files uploads quite well (the whole file is not loaded to memory since 1.0, see http://code.djangoproject.com/ticket/2070).

But django usually sits behind web server and there is often a limit over request body. So Web server config should be probably adjusted (if you are using apache, look at http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestbody ).

这篇关于如何上传Django中的电影文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆