The usage of the @filename API for file uploading is deprecated. Please use the CURLFile class instead.

In PHP 5.5, the @filename method of sending a file using CURL has been deprecated.
Using @filename method to send a file causes exception:
`curl_setopt(): The usage of the @filename API for file uploading is deprecated. Please use the CURLFile class instead`

The possible solution is to pass file content directly to CURL post fields.