DjangoUeditor icon indicating copy to clipboard operation
DjangoUeditor copied to clipboard

文件上传,报500的错误。

Open h3idan opened this issue 11 years ago • 1 comments

文件上传报500的错误。"POST /ueditor/FileUp/product_doc/ HTTP/1.1" 500 69993 是admin页面中

找了一下,没找到原因,之前的版本在图片上传的时候会有这个错误,现在忘了当初怎么改的了。

h3idan avatar May 29 '13 02:05 h3idan

这个问题搞定了。各种测试呀!在DjangoUeditor/views.py中SaveUploadFile这个方法中,将FilePath转成utf-8。在try中加入:FilePath = FilePath.encode('utf-8') 即可。

另外我的环境是Apache2.2 + djang 1.4.3 + mod_python3.3

还要给给本机的/etc/profile 中加入 export LANG='en_US.UTF-8' export LC_ALL='en_US.UTF-8' 这是解决中文路径问题,否则传上去图片之后找不到链接。

h3idan avatar May 31 '13 07:05 h3idan