Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

文件上传的问题 #10

Open
rivergreen opened this issue Oct 28, 2016 · 1 comment
Open

文件上传的问题 #10

rivergreen opened this issue Oct 28, 2016 · 1 comment

Comments

@rivergreen
Copy link

比如针对albums的多图片上传,经测试目前不支持中文文件名,一旦使用含有中文的图片名,运行时服务器端会报错:slice越界。经提示,问题出在:
ext := utils.SubString(filename, strings.LastIndex(filename, "."), 5)
可能是由于文件名不是utf8编码引起的,做如下处理后,正常:
ext := utils.SubString(utils.Unicode(filename), strings.LastIndex(utils.Unicode(filename), "."), 5)
请作者测试验证。

@rivergreen
Copy link
Author

作者的ios系统,表示没有问题。可能是在ios下,文件名也是utf8编码的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant