File name error

See all posts Reply

File name error new!
by Vincent, 13 years, 2 months ago
Code page used UTF-8.
The file cannot be read if the file name contains chinese characters.Reply
Re: File name error new!
by colin, 13 years, 2 months ago
You need to provide more information. What are the errors? What is your system? What do you have in the log produced by the class?Reply
Re: File name error new!
by Vincent, 13 years, 2 months ago
Result in Linux Platform:

- You can use all these before calling process()
file_src_name : 通告001學生守則.pdf
file_src_name_body : 通告001學生守則
file_src_name_ext : pdf
file_src_pathname : /tmp/php0vxXtk
file_src_mime : application/pdf
file_src_size : 143810 (max= 31457280)
file_src_error : 0
- filedir : 2011/09/09
process file to /webhome/web/www/pic_lib/2011/09/09/
- file size OK
- file mime OK : application/pdf
- file name safe format
- destination variables
file_dst_path : /webhome/web/www/pic_lib/2011/09/09/
file_dst_name_body : CueU001AnOUO
file_dst_name_ext : pdf
- checking for auto_rename
auto_rename to CueU001AnOUO_1.pdf
- destination file details
file_dst_name : CueU001AnOUO_1.pdf


Result in Windows IIS Platform: (The file could not be removed by web)

source variables
- You can use all these before calling process()
file_src_name : 通告001學生守則.pdf
file_src_name_body : 通告001學生守則
file_src_name_ext : pdf
file_src_pathname : C:\WINDOWS\Temp\php24.tmp
file_src_mime : application/pdf
file_src_size : 143810 (max= 2097152)
file_src_error : 0
- filedir : 2011/09/09
process file to C:/web.log/pic_lib/2011/09/09/\
- file size OK
- file mime OK : application/pdf
- file name safe format
- destination variables
file_dst_path : C:/web.log/pic_lib/2011/09/09/
file_dst_name_body : £Cu£eU001£A£n££O£UO
file_dst_name_ext : pdf
- checking for auto_rename
- destination file details
file_dst_name : £Cu£eU001£A£n££O£UO.pdfReply
Re: File name error new!
by Vincent, 13 years, 2 months ago
In fact, no error prompt after upload... Strange...Reply
Re: File name error new!
by colin, 13 years, 2 months ago
The behaviour is as expected on Linux platform. On Windows, it looks fine too, it sanitizes the filename too.

That said, I am not supporting the class on Windows platform, since I don't use Windows and cannot test the class on it.Reply