美文网首页
nginx django ubuntu 上传文件错误 Unico

nginx django ubuntu 上传文件错误 Unico

作者: 谢耳朵_X | 来源:发表于2018-06-20 19:48 被阅读9次

    https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/uwsgi/

    项目的uwsgi.ini配置文件增加配置内容:

    Fixing UnicodeEncodeError for file uploads

    If you get a UnicodeEncodeError when uploading files with file names that contain non-ASCII characters, make sure uWSGI is configured to accept non-ASCII file names by adding this to your uwsgi.ini:

    env=LANG=en_US.UTF-8

    See the Files section of the Unicode reference guide for details

    相关文章

      网友评论

          本文标题:nginx django ubuntu 上传文件错误 Unico

          本文链接:https://www.haomeiwen.com/subject/uiaxyftx.html