diff --git a/lib/HttpClient.php b/lib/HttpClient.php
index <HASH>..<HASH> 100644
--- a/lib/HttpClient.php
+++ b/lib/HttpClient.php
@@ -248,7 +248,14 @@ class HttpClient {
 
             if ($this->_needUploadFile || $this->_needUploadContent){
                 if ($this->_needUploadFile && file_exists(realpath($data[$this->_fileKey]))){
-                    $data['file'] = '@' . realpath($data['file']);
+                    if ($this->_needUploadFile && file_exists(realpath($data[$this->_fileKey]))){
+                        if (!class_exists('CURLFile')) {
+                            $data['file'] = '@' . realpath($data['file']);
+                        }
+                        else {
+                            $data['file'] = new CURLFile(realpath($data['file']));
+                        }
+                    }
                 }
 
                 if ($this->_needUploadContent && ($data[$this->_fileKey] !== '')){
#<I> | curl_setopt is deprecated for PHP <I>+