Remove deprecated way of creating upload files

这个提交包含在:
phl0 2024-05-13 16:39:59 +02:00
父节点 a2504882be
当前提交 d50ff03215
找不到此签名对应的密钥
GPG 密钥 ID: 48EA1E640798CA9A

查看文件

@ -297,21 +297,9 @@ class Lotw extends CI_Controller {
//Tell cURL to return the output as a string.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
//If the function curl_file_create exists
if(function_exists('curl_file_create')){
//Use the recommended way, creating a CURLFile object.
$uploadfile = curl_file_create($filePath);
$uploadfile->setPostFilename(basename($filePath));
} else{
//Otherwise, do it the old way.
//Get the canonicalized pathname of our file and prepend
//the @ character.
$uploadfile = '@' . realpath($filePath).';filename='.basename($filePath);
//Turn off SAFE UPLOAD so that it accepts files
//starting with an @
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false);
}
//Use the recommended way, creating a CURLFile object.
$uploadfile = curl_file_create($filePath);
$uploadfile->setPostFilename(basename($filePath));
//Setup our POST fields
$postFields = array(