Fix creating CURLFile
This commit is contained in:
@@ -14,7 +14,7 @@ class File
|
||||
public static function add($filename, $mimetype = '', $postname = '')
|
||||
{
|
||||
if (function_exists('curl_file_create')) {
|
||||
return curl_file_create($filename, $mimetype = '', $postname = '');
|
||||
return curl_file_create($filename, $mimetype, $postname);
|
||||
} else {
|
||||
return sprintf('@%s;filename=%s;type=%s', $filename, $postname ?: basename($filename), $mimetype);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user