File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1091,18 +1091,20 @@ protected function _buildMultipart($method, $params)
10911091
10921092 // check for filenames
10931093 if (in_array ($ key , $ possible_files )) {
1094+ // the file system does not know about UTF-8 filenames
1095+ $ filename_decoded = utf8_decode ($ value );
10941096 if (// is it a file, a readable one?
1095- @file_exists ($ value )
1096- && @is_readable ($ value )
1097+ @file_exists ($ filename_decoded )
1098+ && @is_readable ($ filename_decoded )
10971099
10981100 // is it a valid image?
1099- && $ data = @getimagesize ($ value )
1101+ && $ data = @getimagesize ($ filename_decoded )
11001102 ) {
11011103 // is it a supported image format?
11021104 if (in_array ($ data [2 ], $ this ->_supported_media_files )) {
11031105 // try to read the file
11041106 ob_start ();
1105- readfile ($ value );
1107+ readfile ($ filename_decoded );
11061108 $ data = ob_get_contents ();
11071109 ob_end_clean ();
11081110 if (strlen ($ data ) === 0 ) {
You can’t perform that action at this time.
0 commit comments