{"action":"created","issue":{"url":"https://api.github.com/repos/php/php-src/issues/1217","labels_url":"https://api.github.com/repos/php/php-src/issues/1217/labels{/name}","comments_url":"https://api.github.com/repos/php/php-src/issues/1217/comments","events_url":"https://api.github.com/repos/php/php-src/issues/1217/events","html_url":"https://github.com/php/php-src/pull/1217","id":66312141,"number":1217,"title":"Add support for upload files from buffer string in curl extenion","user":{"login":"Irker","id":925247,"avatar_url":"https://avatars.githubusercontent.com/u/925247?v=3","gravatar_id":"","url":"https://api.github.com/users/Irker","html_url":"https://github.com/Irker","followers_url":"https://api.github.com/users/Irker/followers","following_url":"https://api.github.com/users/Irker/following{/other_user}","gists_url":"https://api.github.com/users/Irker/gists{/gist_id}","starred_url":"https://api.github.com/users/Irker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Irker/subscriptions","organizations_url":"https://api.github.com/users/Irker/orgs","repos_url":"https://api.github.com/users/Irker/repos","events_url":"https://api.github.com/users/Irker/events{/privacy}","received_events_url":"https://api.github.com/users/Irker/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/php/php-src/labels/enhancement","name":"enhancement","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-04-04T12:25:25Z","updated_at":"2015-05-16T20:23:42Z","closed_at":"2015-05-08T08:43:07Z","pull_request":{"url":"https://api.github.com/repos/php/php-src/pulls/1217","html_url":"https://github.com/php/php-src/pull/1217","diff_url":"https://github.com/php/php-src/pull/1217.diff","patch_url":"https://github.com/php/php-src/pull/1217.patch"},"body":"Add possible to upload files from string, not from disc:\r\nNew class CURLBufferFile, similar for CURLFile, but contain buffer with file data, and require filename field.\r\n\r\n```php\r\n$ch = curl_init('http://localhost:8000/server.php');\r\n\r\n$file = generate_some_special_image_file(); // just for example, it may be autogenerated pdf, image or something special in memory\r\n\r\n$cfile = new CURLBufferFile($file, 'test_name.jpg', 'image/jpeg');\r\n\r\n$data = array('test_file' => $cfile);\r\ncurl_setopt($ch, CURLOPT_POST, 1);\r\ncurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\r\n\r\n$result = curl_exec($ch);\r\n```\r\n\r\n\r\nNot sure about unserialization for this class. "},"comment":{"url":"https://api.github.com/repos/php/php-src/issues/comments/102681268","html_url":"https://github.com/php/php-src/pull/1217#issuecomment-102681268","issue_url":"https://api.github.com/repos/php/php-src/issues/1217","id":102681268,"user":{"login":"Irker","id":925247,"avatar_url":"https://avatars.githubusercontent.com/u/925247?v=3","gravatar_id":"","url":"https://api.github.com/users/Irker","html_url":"https://github.com/Irker","followers_url":"https://api.github.com/users/Irker/followers","following_url":"https://api.github.com/users/Irker/following{/other_user}","gists_url":"https://api.github.com/users/Irker/gists{/gist_id}","starred_url":"https://api.github.com/users/Irker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Irker/subscriptions","organizations_url":"https://api.github.com/users/Irker/orgs","repos_url":"https://api.github.com/users/Irker/repos","events_url":"https://api.github.com/users/Irker/events{/privacy}","received_events_url":"https://api.github.com/users/Irker/received_events","type":"User","site_admin":false},"created_at":"2015-05-16T20:23:42Z","updated_at":"2015-05-16T20:23:42Z","body":"https://github.com/php/php-src/pull/1283"}}