{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony-docs/issues/10143","repository_url":"https://api.github.com/repos/symfony/symfony-docs","labels_url":"https://api.github.com/repos/symfony/symfony-docs/issues/10143/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony-docs/issues/10143/comments","events_url":"https://api.github.com/repos/symfony/symfony-docs/issues/10143/events","html_url":"https://github.com/symfony/symfony-docs/pull/10143","id":347140134,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1ODM0Njgw","number":10143,"title":"Update upload_file.rst","user":{"login":"BernardA","id":9449665,"node_id":"MDQ6VXNlcjk0NDk2NjU=","avatar_url":"https://avatars0.githubusercontent.com/u/9449665?v=4","gravatar_id":"","url":"https://api.github.com/users/BernardA","html_url":"https://github.com/BernardA","followers_url":"https://api.github.com/users/BernardA/followers","following_url":"https://api.github.com/users/BernardA/following{/other_user}","gists_url":"https://api.github.com/users/BernardA/gists{/gist_id}","starred_url":"https://api.github.com/users/BernardA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BernardA/subscriptions","organizations_url":"https://api.github.com/users/BernardA/orgs","repos_url":"https://api.github.com/users/BernardA/repos","events_url":"https://api.github.com/users/BernardA/events{/privacy}","received_events_url":"https://api.github.com/users/BernardA/received_events","type":"User","site_admin":false},"labels":[{"id":390692613,"node_id":"MDU6TGFiZWwzOTA2OTI2MTM=","url":"https://api.github.com/repos/symfony/symfony-docs/labels/Status:%20Needs%20Review","name":"Status: Needs Review","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-02T19:16:25Z","updated_at":"2018-08-06T17:12:31Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/symfony/symfony-docs/pulls/10143","html_url":"https://github.com/symfony/symfony-docs/pull/10143","diff_url":"https://github.com/symfony/symfony-docs/pull/10143.diff","patch_url":"https://github.com/symfony/symfony-docs/pull/10143.patch"},"body":"The existing code is wrong. The result of $product->getBrochure(); is simply a string, which will then throw an error on the $file->guessExtension() line.\r\nSee https://stackoverflow.com/questions/49604601/call-to-a-member-function-guessextension-on-string.\r\nIt should get the file object as such directly from form data, as the proposed code does.\r\n\r\n<!--\r\n\r\nIf your pull request fixes a BUG, use the oldest maintained branch that contains\r\nthe bug (see https://symfony.com/roadmap for the list of maintained branches).\r\n\r\nIf your pull request documents a NEW FEATURE, use the same Symfony branch where\r\nthe feature was introduced (and `master` for features of unreleased versions).\r\n\r\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/symfony/symfony-docs/issues/comments/410781197","html_url":"https://github.com/symfony/symfony-docs/pull/10143#issuecomment-410781197","issue_url":"https://api.github.com/repos/symfony/symfony-docs/issues/10143","id":410781197,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDc4MTE5Nw==","user":{"login":"BernardA","id":9449665,"node_id":"MDQ6VXNlcjk0NDk2NjU=","avatar_url":"https://avatars0.githubusercontent.com/u/9449665?v=4","gravatar_id":"","url":"https://api.github.com/users/BernardA","html_url":"https://github.com/BernardA","followers_url":"https://api.github.com/users/BernardA/followers","following_url":"https://api.github.com/users/BernardA/following{/other_user}","gists_url":"https://api.github.com/users/BernardA/gists{/gist_id}","starred_url":"https://api.github.com/users/BernardA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BernardA/subscriptions","organizations_url":"https://api.github.com/users/BernardA/orgs","repos_url":"https://api.github.com/users/BernardA/repos","events_url":"https://api.github.com/users/BernardA/events{/privacy}","received_events_url":"https://api.github.com/users/BernardA/received_events","type":"User","site_admin":false},"created_at":"2018-08-06T17:12:31Z","updated_at":"2018-08-06T17:12:31Z","author_association":"NONE","body":"Yes, I've actually tested the code."}}
{"actor":{"display_login":"BernardA"}}