From http://stackoverflow.com/questions/18318052/php-curl-post-with-file-attachement-custom-content-type-header