擅长:python、mysql、java
<p>XSend需要中文件的路径
<code>response['X-Sendfile']</code>
所以,你可以</p>
<pre><code>response['X-Sendfile'] = smart_str(path_to_file)
</code></pre>
<p>这里,<code>path_to_file</code>是文件的完整路径(不仅仅是文件名)
签出这个<a href="http://djangosnippets.org/snippets/2226/" rel="nofollow">django-snippet</a></p>