CTOlet / yii2-attachments

Yii2 extension for uploading and attaching the files to the models
66 stars 57 forks source link

This is a new pull request check it #16

Open hexl opened 9 years ago

hexl commented 9 years ago

if the file name is chinese, for example: 中文文件名测试.jpg add '' to the file name when saving it to the move it to the temp folder. remove the first '' when insert the file name into database.

CTOlet commented 9 years ago

Bro, I have just tested that and I have not caught that error on my Mac. What OS do you use?

hexl commented 9 years ago

Windows Seven SP1 simple Chinese

hexl commented 9 years ago

if the file name is chinese file name, the pathinfo can not get the right file name.

CTOlet commented 9 years ago

I have used chinese file name but have not seen any error

CTOlet commented 9 years ago

Just now I have tested uploading and downloading on mac os and windows and have not seen that problem. When do you have that error? I can not understand you. My file name is 中文文件名测试.xlsx

hexl commented 9 years ago

How about this? http://php.net/manual/vote-note.php?id=79980&page=function.pathinfo&vote=up

CTOlet commented 9 years ago

7 years ago?? Are you serious? Which version of the PHP do you use?

hexl commented 9 years ago

i use 5.4

hexl commented 9 years ago

the recent comments about file name http://php.net/manual/vote-note.php?id=117298&page=function.pathinfo&vote=up

CTOlet commented 9 years ago

Are you sure about 5.4? On http://php.net/manual/vote-note.php?id=117298&page=function.pathinfo&vote=up the bug is risen if you use 5.3

hexl commented 9 years ago

I'm sure. But i wonder if it's my php.ini or http.conf config error. I found the bug in this framework. https://github.com/liu21st/thinkphp/blob/master/ThinkPHP/Library/Think/Upload.class.php#L370

CTOlet commented 9 years ago

So, do you solved the problem?

hexl commented 9 years ago

This PR has solved the problem.